Module#module_function as a toggle and inside eval works differently than MRI,
falis rubyspecs
----------------------------------------------------------------------------------------------
Key: JRUBY-2627
URL: http://jira.codehaus.org/browse/JRUBY-2627
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.1.2
Environment: Latest JRuby 1.1.2
Reporter: Vladimir Sizikov
{noformat}
mspec run -t j spec/ruby/1.8/core/module/module_function_spec.rb
...............EE
1)
Module#module_function as a toggle (no arguments) in a Module body affects
definitions when inside an eval even if the definitions are outside of it ERROR
NameError: undefined local variable or method `module_function' for
#<Object:0x15c13ef>
(eval):1:in `/opt/work/./spec/ruby/1.8/core/module/module_function_spec.rb'
2)
Module#module_function as a toggle (no arguments) in a Module body functions
normally if both toggle and definitions inside a module_eval ERROR
NameError: undefined local variable or method `module_function' for
#<Object:0x15c13ef>
(eval):1:in `/opt/work/./spec/ruby/1.8/core/module/module_function_spec.rb'
Finished in 0.137000 seconds
1 file, 17 examples, 36 expectations, 0 failures, 2 errors
{noformat}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email