Skip to content

Commit

Permalink
Fix passing a method as a block under 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
rtomayko committed Feb 3, 2009
1 parent 4a7eea6 commit c8f1c7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sinatra/base.rb
Expand Up @@ -514,7 +514,7 @@ def set(option, value=self)
metadef("#{option}?") { !!__send__(option) }
metadef("#{option}=") { |val| set(option, Proc.new{val}) }
elsif value == self && option.respond_to?(:to_hash)
option.to_hash.each(&method(:set))
option.to_hash.each { |k,v| set(k, v) }
elsif respond_to?("#{option}=")
__send__ "#{option}=", value
else
Expand Down

0 comments on commit c8f1c7c

Please sign in to comment.