First off - thank you very much for creating boson. I've found it to be a wonderful tool. Recently I've been upgrading from < 1.0 to 1.2.3. I've noticed that defining "options" as "Hash.new()" does not work.
module Foo
option :urgent, type: :boolean, default: true
def say(text, options=Hash.new())
text.capitalize! if options[:urgent]
puts text
end
end
Where as this works:
module Foo
option :urgent, type: :boolean, default: true
def say(text, options={})
text.capitalize! if options[:urgent]
puts text
end
end
This was execute with: ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux]
First off - thank you very much for creating boson. I've found it to be a wonderful tool. Recently I've been upgrading from < 1.0 to 1.2.3. I've noticed that defining "options" as "Hash.new()" does not work.
Where as this works:
This was execute with: ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux]