Permalink
Browse files

WIP stack level to deep error

  • Loading branch information...
1 parent 1b8467b commit f74feba7a06ad3b7588420287558b932e3d0d52e @bmizerany committed Feb 7, 2009
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/sinatra/base.rb
View
8 lib/sinatra/base.rb
@@ -525,6 +525,10 @@ class << self
:middleware, :errors
public
+ def to_proc
+ Proc.new { run self }
+ end
+
def set(option, value=self)
if value.kind_of?(Proc)
metadef(option, &value)
@@ -929,6 +933,7 @@ def self.register(*extensions, &block) #:nodoc:
Delegator.delegate *added_methods
super(*extensions, &block)
end
+
end
# The top-level Application. All DSL methods executed on main are delegated
@@ -998,6 +1003,7 @@ class Rack::Builder
def Sinatra(file, base=Sinatra::Default)
Sinatra.new(base) {
expanded = File.expand_path(file)
- self.class_eval(File.read(expanded), expanded) }
+ self.class_eval(File.read(expanded), expanded)
+ }
end
end

0 comments on commit f74feba

Please sign in to comment.