You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
name: ::
NameError: wrong constant name ::
from (irb):2:in `const_get'
from (irb):2:in `catch_error'
from (irb):8
from /Users/alex/.rubies/ruby-2.2.2/bin/irb:11:in `<main>'
Jruby output:
name:
NameError: wrong constant name ::
from org/jruby/RubyModule.java:3054:in `const_get'
from (irb):15:in `catch_error'
from (irb):21:in `<eval>'
from org/jruby/RubyKernel.java:1005:in `eval'
from org/jruby/RubyKernel.java:1315:in `loop'
from org/jruby/RubyKernel.java:1125:in `catch'
from org/jruby/RubyKernel.java:1125:in `catch'
from /Users/alex/.rubies/jruby-9.0.0.0-SNAPSHOT/bin/irb:13:in `<top>'
@gazay Thanks for the good case! I believe JRuby matches all the examples you provided. Perhaps you'd like to take another step and add specs for some of these cases to https://github.com/ruby/rubyspec under core/module/const_get_spec.rb and friends? It's fun, and would let us move on to the next bug fix :-)
MRI output:
Jruby output:
Failing test in AS:
https://github.com/rails/rails/blob/master/activesupport/test/constantize_test_cases.rb#L90
https://github.com/rails/rails/blob/master/activesupport/test/core_ext/string_ext_test.rb#L296
NameError#name should return
::
as provided constant name but it returns empty stringBacktrace:
Re-run test from activesupport directory with:
ruby -w -Itest test/core_ext/string_ext_test.rb -n test_safe_constantize
The text was updated successfully, but these errors were encountered: