This code used to work until the last week or two:
require 'delegate’
class Row < DelegateClass(Array)
def initialize(*values)
@arr = values
super(@arr)
end
end
row = Row.new(‘a’,‘b’,‘c’)
a,b,c = row
p a
p b
p c
Under 1.6 and 1.8 preview2:
“a”
“b”
“c”
Under recent 1.8 snapshots:
[“a”, “b”, “c”]
nil
nil
···
This breaks ruby-dbi, which is why it caught my attention. Can anyone
comment on this? Is this a permanent change?
Thanks,
-Brad