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 008519b commit bf14ad4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sinatra/base.rb
Expand Up @@ -637,7 +637,7 @@ def set(option, value=self)
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

2 comments on commit bf14ad4

@DAddYE
Copy link
Contributor

@DAddYE DAddYE commented on bf14ad4 Mar 4, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!!!! Good!

@DAddYE
Copy link
Contributor

@DAddYE DAddYE commented on bf14ad4 Mar 5, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember to release the 0.9.6 on rubygems.

Thanks!

Please sign in to comment.