New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_id2ref should raise RangeError rather than return nil for no object found #3324

Closed
chrisseaton opened this Issue Sep 14, 2015 · 3 comments

Comments

Projects
None yet
4 participants
@chrisseaton
Contributor

chrisseaton commented Sep 14, 2015

JRuby:

irb(main):001:0> ObjectSpace._id2ref 545556
=> nil

MRI:

irb(main):001:0> ObjectSpace._id2ref 545556
RangeError: 0x00000000085314 is not id value
    from (irb):1:in `_id2ref'
    from (irb):1
    from /Users/chrisseaton/.rbenv/versions/2.2.3/bin/irb:11:in `<main>'

@chrisseaton chrisseaton added the core label Sep 14, 2015

@kares kares added the beginner label Sep 14, 2015

@bitfurry

This comment has been minimized.

Show comment
Hide comment
@bitfurry

bitfurry Sep 14, 2015

Contributor

@chrisseaton can specify the versions of Jruby and MRI ?
As for MRI 2.2.2 and Jruby 9.0.2.0 is not showing this error.

Contributor

bitfurry commented Sep 14, 2015

@chrisseaton can specify the versions of Jruby and MRI ?
As for MRI 2.2.2 and Jruby 9.0.2.0 is not showing this error.

@chrisseaton

This comment has been minimized.

Show comment
Hide comment
@chrisseaton

chrisseaton Sep 14, 2015

Contributor
$ ~/.rbenv/versions/1.8.7-p375/bin/irb
irb(main):001:0> ObjectSpace._id2ref 545556
RangeError: 0x85314 is not id value
    from (irb):1:in `_id2ref'
    from (irb):1
    from :0

$ ~/.rbenv/versions/1.9.3-p551/bin/irb
irb(main):001:0> ObjectSpace._id2ref 545556
RangeError: 0x00000000085314 is not id value
    from (irb):1:in `_id2ref'
    from (irb):1
    from /Users/chrisseaton/.rbenv/versions/1.9.3-p551/bin/irb:12:in `<main>'

$ ~/.rbenv/versions/2.0.0-p645/bin/irb
irb(main):001:0> ObjectSpace._id2ref 545556
RangeError: 0x00000000085314 is not id value
    from (irb):1:in `_id2ref'
    from (irb):1
    from /Users/chrisseaton/.rbenv/versions/2.0.0-p645/bin/irb:12:in `<main>'

 $ ~/.rbenv/versions/2.1.6/bin/irb
irb(main):001:0> ObjectSpace._id2ref 545556
RangeError: 0x00000000085314 is not id value
    from (irb):1:in `_id2ref'
    from (irb):1
    from /Users/chrisseaton/.rbenv/versions/2.1.6/bin/irb:11:in `<main>'

$ ~/.rbenv/versions/2.2.2/bin/irb 
irb(main):001:0> ObjectSpace._id2ref 545556
RangeError: 0x00000000085314 is not id value
  from (irb):1:in `_id2ref'
  from (irb):1
  from /Users/chrisseaton/.rbenv/versions/2.2.2/bin/irb:11:in `<main>'

$ ~/.rbenv/versions/2.2.3/bin/irb 
irb(main):001:0> ObjectSpace._id2ref 545556
RangeError: 0x00000000085314 is not id value
  from (irb):1:in `_id2ref'
  from (irb):1
  from /Users/chrisseaton/.rbenv/versions/2.2.3/bin/irb:11:in `<main>'

$ ~/.rbenv/versions/jruby-1.7.22/bin/ruby -X+O -S irb
irb(main):001:0> ObjectSpace._id2ref 545556
=> nil

$ ~/.rbenv/versions/jruby-9.0.0.0/bin/ruby -X+O -S irb
irb(main):001:0> ObjectSpace._id2ref 545556
=> nil

$ ~/.rbenv/versions/jruby-9.0.1.0/bin/ruby -X+O -S irb
irb(main):001:0> ObjectSpace._id2ref 545556
=> nil

$ bin/jruby -X+O -S irb
irb(main):001:0> ObjectSpace._id2ref 545556
=> nil

$ ~/.rbenv/versions/rbx-2.5.8/bin/irb
irb(main):001:0> ObjectSpace._id2ref 545556
=> nil
Contributor

chrisseaton commented Sep 14, 2015

$ ~/.rbenv/versions/1.8.7-p375/bin/irb
irb(main):001:0> ObjectSpace._id2ref 545556
RangeError: 0x85314 is not id value
    from (irb):1:in `_id2ref'
    from (irb):1
    from :0

$ ~/.rbenv/versions/1.9.3-p551/bin/irb
irb(main):001:0> ObjectSpace._id2ref 545556
RangeError: 0x00000000085314 is not id value
    from (irb):1:in `_id2ref'
    from (irb):1
    from /Users/chrisseaton/.rbenv/versions/1.9.3-p551/bin/irb:12:in `<main>'

$ ~/.rbenv/versions/2.0.0-p645/bin/irb
irb(main):001:0> ObjectSpace._id2ref 545556
RangeError: 0x00000000085314 is not id value
    from (irb):1:in `_id2ref'
    from (irb):1
    from /Users/chrisseaton/.rbenv/versions/2.0.0-p645/bin/irb:12:in `<main>'

 $ ~/.rbenv/versions/2.1.6/bin/irb
irb(main):001:0> ObjectSpace._id2ref 545556
RangeError: 0x00000000085314 is not id value
    from (irb):1:in `_id2ref'
    from (irb):1
    from /Users/chrisseaton/.rbenv/versions/2.1.6/bin/irb:11:in `<main>'

$ ~/.rbenv/versions/2.2.2/bin/irb 
irb(main):001:0> ObjectSpace._id2ref 545556
RangeError: 0x00000000085314 is not id value
  from (irb):1:in `_id2ref'
  from (irb):1
  from /Users/chrisseaton/.rbenv/versions/2.2.2/bin/irb:11:in `<main>'

$ ~/.rbenv/versions/2.2.3/bin/irb 
irb(main):001:0> ObjectSpace._id2ref 545556
RangeError: 0x00000000085314 is not id value
  from (irb):1:in `_id2ref'
  from (irb):1
  from /Users/chrisseaton/.rbenv/versions/2.2.3/bin/irb:11:in `<main>'

$ ~/.rbenv/versions/jruby-1.7.22/bin/ruby -X+O -S irb
irb(main):001:0> ObjectSpace._id2ref 545556
=> nil

$ ~/.rbenv/versions/jruby-9.0.0.0/bin/ruby -X+O -S irb
irb(main):001:0> ObjectSpace._id2ref 545556
=> nil

$ ~/.rbenv/versions/jruby-9.0.1.0/bin/ruby -X+O -S irb
irb(main):001:0> ObjectSpace._id2ref 545556
=> nil

$ bin/jruby -X+O -S irb
irb(main):001:0> ObjectSpace._id2ref 545556
=> nil

$ ~/.rbenv/versions/rbx-2.5.8/bin/irb
irb(main):001:0> ObjectSpace._id2ref 545556
=> nil
@bitfurry

This comment has been minimized.

Show comment
Hide comment
@bitfurry

bitfurry Sep 15, 2015

Contributor

@chrisseaton I fixed the issue. Please feel to comment on my pull request.

Contributor

bitfurry commented Sep 15, 2015

@chrisseaton I fixed the issue. Please feel to comment on my pull request.

@nirvdrum nirvdrum referenced this issue Sep 15, 2015

Merged

Issue #3324 #3327

@enebo enebo added this to the JRuby 9.0.2.0 milestone Oct 13, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment