Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

JRuby 1.7.4 Regression, defined? fails for ::BasicObject #814

Closed
JonRowe opened this Issue · 4 comments

2 participants

@JonRowe

On JRuby 1.7.4 defined? reports that BasicObject is undefined in 1.9 mode.

jruby-1.7.4 :018 > defined? ::BasicObject
 => nil
jruby-1.7.4 :019 > BasicObject
 => BasicObject

Yet it is defined and usable... Curiously when execing the same code from -e it works...

~$ ruby -v
jruby 1.7.4 (1.9.3p392) 2013-05-16
~$ ruby -e 'p defined?(::BasicObject)'
"constant"
~$ irb
jruby-1.7.4 > defined?(::BasicObject)
 => nil
@JonRowe JonRowe referenced this issue in rspec/rspec-mocks
Merged

Fix for JRuby 1.7.4 in 1.9 mode #319

@JonRowe JonRowe referenced this issue in rspec/rspec-mocks
Merged

Refactor the workaround for JRuby 1.7.4 #322

@headius
Owner

Seems to only be broken in interpreter. Compiler is ok:

ext-jruby-local ~/projects/jruby $ jruby -X-C -e "p defined?(::BasicObject)"
nil

ext-jruby-local ~/projects/jruby $ jruby -X+C -e "p defined?(::BasicObject)"
"constant"
@headius headius closed this in f493dd8
@JonRowe

Maybe, but this crops up for example, when running rspec tests (where this bug was discovered)

@JonRowe

Thanks for looking at this @headius, does this mean it's fixed? Will it go out in the next release? (1.7.5?)

@headius
Owner

Yup, fixed and in 1.7.5. Thanks for the report!

@shin-szk-engineering shin-szk-engineering referenced this issue from a commit in szk-engineering/loremipsum
@shin-szk-engineering shin-szk-engineering