C
Chris Roos
I actually spotted this in a rails app but traced it back to ruby. Is
this a real problem/bug or am I missing something obvious?
$ cat > person.rb
class Person < Struct.newforename, :surname)
end
$ irb
irb> load 'person.rb'
=> true
irb> load 'person.rb'
TypeError: superclass mismatch for class Person
from ./person.rb:1
from (irb):2
This behaviour has been experienced with both ruby 1.8.2 and 1.8.4.
Chris
this a real problem/bug or am I missing something obvious?
$ cat > person.rb
class Person < Struct.newforename, :surname)
end
$ irb
irb> load 'person.rb'
=> true
irb> load 'person.rb'
TypeError: superclass mismatch for class Person
from ./person.rb:1
from (irb):2
This behaviour has been experienced with both ruby 1.8.2 and 1.8.4.
Chris