Projects

Ticket #245 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

Adding to a set causes a Cocoa exception to be thrown

Reported by: dave.baldwin@… Owned by: lsansonetti@…
Priority: minor Milestone: MacRuby 0.5
Component: MacRuby Keywords: Set operation
Cc:

Description

Using MacRuby 0.4 from binary release

macirb

require 'set'

=> true

s = Set.new([1, 2, 3])

=> #<NSMutableSet: {1, 3, 2}>

s += [3, 4, 5]

2009-04-23 21:29:52.283 macruby[28862:807] *** -[NSCFArray _applyValues:context:]: unrecognized selector sent to instance 0x8003bb880 2009-04-23 21:29:52.327 macruby[28862:807] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFArray _applyValues:context:]: unrecognized selector sent to instance 0x8003bb880' 2009-04-23 21:29:52.329 macruby[28862:807] Stack: (

140735400467644, 140735361919183, 140735400494587, 140735400488068, 140735400488408, 4295756381, 4296060487, 4296022528, 4296038274, 4296040906, 4296042941, 4296060487, 4296017903, 4296038274, 4296074210, 4295152351, 4295972229, 4296060487, 4296017903, 4296038274, 4296066293, 4296060487, 4296017903, 4296038274, 4296066293, 4296060487, 4296017903, 4296038274, 4296038924, 4295151522, 4295164775, 4294971167, 4294971044

) terminate called after throwing an instance of 'NSException' Abort

Change History

Changed 2 years ago by lsansonetti@…

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to MacRuby 0.5

Seems to work as of r2896:

$ macruby -r set -e 's=Set.new([1,2,3]); s+=[4,5,6]; p s'
#<Set: {3, 6, 2, 5, 1, 4}>
Note: See TracTickets for help on using tickets.