ruby: typo

develop
jj 2012-05-03 03:33:50 +02:00
parent 5fdeac9913
commit 8952eabd62
1 changed files with 1 additions and 1 deletions

@ -114,7 +114,7 @@ class Compound < MemStruct
def _set(h) def _set(h)
case h case h
when Hash; h.each { |k, v| send("_#{k}=", v) } when Hash; h.each { |k, v| send("_#{k}=", v) }
when Array; names = _field_names ; raise 'bad size' if names.length != h.length ; names.zip(h).each { |n, a| send("#{n}=", a } when Array; names = _field_names ; raise 'bad size' if names.length != h.length ; names.zip(h).each { |n, a| send("#{n}=", a) }
when Compound; _field_names.each { |n| send("#{n}=", h.send(n)) } when Compound; _field_names.each { |n| send("#{n}=", h.send(n)) }
else raise 'wut?' else raise 'wut?'
end end