oggy / looksee

Supercharged method introspection in IRB
MIT License
364 stars 14 forks source link

Bus Error when lp called on Fixnum/TrueClass/FalseClass/NilClass/Symbol instances (1.8.7, 1.9) #3

Closed l15n closed 15 years ago

l15n commented 15 years ago
irb(main):001:0> lp true
/opt/local/lib/ruby/gems/1.8/gems/looksee-0.0.1/lib/looksee.rb:130: [BUG] Bus Error
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9]

This also happens for Fixnums, false, nil, and literal symbols.

This problem happens here: VALUE Looksee_internal_class(VALUE self, VALUE object) { return RBASIC(object)->klass; }

Fixed here:

Will send a pull request.

oggy commented 15 years ago

Don't die when examining immediate objects. Closed by d408fe38569fcff7aae76fff0a4f7e71b58643f9.

oggy commented 15 years ago

Thanks for the report and patch. I found a simpler fix, and added tests. Try v0.0.2.