Skip to content

Commit

Permalink
work around ruby >= 1.8.7-p248 segfault bug #2781
Browse files Browse the repository at this point in the history
This seems to avoid triggering whatever craziness is causing
the segfault. For more info see:

http://redmine.ruby-lang.org/issues/show/2781
  • Loading branch information
rtomayko committed Mar 4, 2010
1 parent d12ea0e commit ae34a6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sinatra/base.rb
Expand Up @@ -699,7 +699,7 @@ def set(option, value=self, &block)
if value.kind_of?(Proc)
metadef(option, &value)
metadef("#{option}?") { !!__send__(option) }
metadef("#{option}=") { |val| set(option, Proc.new{val}) }
metadef("#{option}=") { |val| metadef(option, &Proc.new{val}) }
elsif value == self && option.respond_to?(:to_hash)
option.to_hash.each { |k,v| set(k, v) }
elsif respond_to?("#{option}=")
Expand Down

0 comments on commit ae34a6f

Please sign in to comment.