Ticket #31 (closed defect: fixed)
Problems calling NSNumber#intValue
| Reported by: | lsansonetti@… | Owned by: | lsansonetti@… |
|---|---|---|---|
| Priority: | blocker | Milestone: | MacRuby 0.1 |
| Component: | MacRuby | Keywords: | |
| Cc: |
Description
First, it doesn't seem possible to call #intValue on an NSCFNumber that was created from Ruby
$ ./miniruby -e "NSNumber.numberWithInt(42.0).intValue" -e:1:in `<main>': undefined method `intValue' for #<NSCFNumber:0x1087490> (NoMethodError)
Second, calling #intValue on a NSCFNumber that was returned from the ObjC world crashes the interpreter
gdb --args ./miniruby -e "framework 'foundation'; p [1].objectAtIndex(0).intValue" [...] Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00000258 0x93d1e30b in _class_isMetaClass ()
Change History
Note: See
TracTickets for help on using
tickets.

