topazproject / topaz

A high performance ruby, written in RPython
topazruby.com
BSD 3-Clause "New" or "Revised" License
1k stars 84 forks source link

Guard sort with unexpected block from segfault #856

Closed kachick closed 8 years ago

kachick commented 8 years ago
☻  bin/topaz -e '[0, 1].sort{ |n, m| BasicObject.new }'
[1]    53408 segmentation fault  bin/topaz -e '[0, 1].sort{ |n, m| BasicObject.new }'

last of untranslated

File "topaz/objects/arrayobject.py", line 29, in lt
  return self.space.int_w(w_cmp_res) < 0
File "topaz/objspace.py", line 462, in int_w
  return w_obj.int_w(self)
AttributeError: 'W_Object' object has no attribute 'int_w'

ruby-1.9.3p551

☻  ruby -e '[0, 1].sort{ |n, m| BasicObject.new }'
-e:1:in `sort': undefined method `>' for #<BasicObject:0x007fe1e91033f8> (NoMethodError)