Bug in constant lookup on non Module or Class
---------------------------------------------
Key: JRUBY-2349
URL: http://jira.codehaus.org/browse/JRUBY-2349
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.1
Environment: Latest JRuby 1.1
Reporter: Vladimir Sizikov
ruby -e ':File::TEST' ---> e:1: File is not a class/module (TypeError)
jruby -e ':File::TEST' ---> undefined method `TEST' for :File:Symbol
(NoMethodError)
Basically, JRuby raises different exception.
This bug is inspired by:
http://rubinius.lighthouseapp.com/projects/5089/tickets/457
Also, since the new spec added, Jruby fails it now:
{noformat}
>bin/mspec ci -t j -X /opt/work/jruby.git/test/spec_excludes
>spec/ruby/1.8/language/constants_spec.rb
..........F....
1)
Constant lookup rule only searches a Module or Class FAILED
Expected TypeError
but got NoMethodError (undefined method `TEST' for :File:Symbol)
/opt/work/rbx.git/./mspec/expectations.rb:10:in `fail_with'
/opt/work/rbx.git/./mspec/expectations/should.rb:6:in `should'
/opt/work/rbx.git/./spec/ruby/1.8/language/constants_spec.rb:73:in
`/opt/work/rbx.git/./spec/ruby/1.8/language/constants_spec.rb'
/opt/work/rbx.git/./mspec/runner/mspec.rb:112:in `call'
/opt/work/rbx.git/./mspec/runner/mspec.rb:112:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `each'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:60:in `process'
/opt/work/rbx.git/./mspec/runner/state.rb:56:in `each'
/opt/work/rbx.git/./mspec/runner/state.rb:56:in `process'
/opt/work/rbx.git/./mspec/runner/mspec.rb:19:in `describe'
/opt/work/rbx.git/./mspec/runner/object.rb:11:in `describe'
/opt/work/rbx.git/./spec/ruby/1.8/language/constants_spec.rb:17:in
`/opt/work/rbx.git/./spec/ruby/1.8/language/constants_spec.rb'
/opt/work/rbx.git/./spec/ruby/1.8/language/constants_spec.rb:37:in `load'
/opt/work/rbx.git/./mspec/runner/mspec.rb:37:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:112:in `call'
/opt/work/rbx.git/./mspec/runner/mspec.rb:112:in `protect'
/opt/work/rbx.git/./mspec/runner/mspec.rb:37:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:34:in `each'
/opt/work/rbx.git/./mspec/runner/mspec.rb:34:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:26:in `process'
mspec/bin/mspec-ci:59
{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