制御構文の中でのスコープってないのかなぁ?
irb(main):001:0> prefix NameError: undefined local variable or method `prefix' for main:Object from (irb):1 irb(main):002:0> if true irb(main):003:1> else irb(main):004:1* prefix = '' irb(main):005:1> end => nil irb(main):006:0> puts prefix nil => nil irb(main):007:0> if true irb(main):008:1> foo = '' irb(main):009:1> end => "" irb(main):010:0> p foo "" => nil irb(main):011:0>