<?xml version="1.0" encoding="UTF-8"?>
<tickets type="array">
  <ticket>
    <assigned-user-id type="integer">17123</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2010-02-02T21:32:56-08:00</created-at>
    <creator-id type="integer">58615</creator-id>
    <milestone-due-on type="datetime" nil="true"></milestone-due-on>
    <milestone-id type="integer">41832</milestone-id>
    <number type="integer">324</number>
    <permalink>large-data-set-streaming-aka-send_data-redux</permalink>
    <priority type="integer">45</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>invalid</state>
    <tag>&quot;sinatra streaming send_data large  response&quot;</tag>
    <title>large data set streaming (aka send_data redux)</title>
    <updated-at type="datetime">2010-02-03T07:41:30-08:00</updated-at>
    <user-id type="integer">17123</user-id>
    <user-name>Ryan Tomayko</user-name>
    <creator-name>Jordan Ritter</creator-name>
    <assigned-user-name>Ryan Tomayko</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/324</url>
    <milestone-title>1.0</milestone-title>
    <original-body>Recently ran into a situation in an app where I needed to send back a lot of data (think 50,000 rows of CSV).  At first I tried a few different methods joining the rows:

@@@ ruby
output = rows.join(&quot;,&quot;) + &quot;\n&quot;
output = rows.inject(&quot;&quot;) { |s, r| s += r .. }
@@@

etc etc.  But the building of that final string of data with tens of thousands of rows took *minutes*.  What I observed was that the larger the string Ruby tried to build, the slower the string append operations got.  This happened to be a Rails app so I eventually discovered the render :text =&gt; proc {} method, then settled upon the slightly more succinct send_data().

Today I ran into the same problem on one of my sinatra apps.  I see from ticket #143 that send_data() was deprecated and is now gone (while send_file() remains).  However the solution suggested in that ticket results in the problem I ran into on the Rails app, and necessitates a streaming mechanism to be viable.  I ended up creating a simple stream class wrapping my array and implementing #each(), and ending the sinatra callback with a &quot;halt stream&quot;.  

I don't know the reasoning behind deprecating send_data(), but IMHO it was useful and worthwhile.  Maybe there's some other streaming facility I'm not aware of that doesn't require building a huge contiguous string in memory?  Otherwise it'd be great to have it back..</original-body>
    <latest-body>Recently ran into a situation in an app where I needed to send back a lot of data (think 50,000 rows of CSV).  At first I tried a few different methods joining the rows:

@@@ ruby
output = rows.join(&quot;,&quot;) + &quot;\n&quot;
output = rows.inject(&quot;&quot;) { |s, r| s += r .. }
@@@

etc etc.  But the building of that final string of data with tens of thousands of rows took *minutes*.  What I observed was that the larger the string Ruby tried to build, the slower the string append operations got.  This happened to be a Rails app so I eventually discovered the render :text =&gt; proc {} method, then settled upon the slightly more succinct send_data().

Today I ran into the same problem on one of my sinatra apps.  I see from ticket #143 that send_data() was deprecated and is now gone (while send_file() remains).  However the solution suggested in that ticket results in the problem I ran into on the Rails app, and necessitates a streaming mechanism to be viable.  I ended up creating a simple stream class wrapping my array and implementing #each(), and ending the sinatra callback with a &quot;halt stream&quot;.  

I don't know the reasoning behind deprecating send_data(), but IMHO it was useful and worthwhile.  Maybe there's some other streaming facility I'm not aware of that doesn't require building a huge contiguous string in memory?  Otherwise it'd be great to have it back..</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;Recently ran into a situation in an app where I needed to send
back a lot of data (think 50,000 rows of CSV). At first I tried a
few different methods joining the rows:&lt;/p&gt;
&lt;pre&gt;
&lt;code class=&quot;ruby&quot;&gt;output = rows.join(&quot;,&quot;) + &quot;\n&quot;
output = rows.inject(&quot;&quot;) { |s, r| s += r .. }&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;etc etc. But the building of that final string of data with tens
of thousands of rows took &lt;em&gt;minutes&lt;/em&gt;. What I observed was
that the larger the string Ruby tried to build, the slower the
string append operations got. This happened to be a Rails app so I
eventually discovered the render :text =&amp;gt; proc {} method, then
settled upon the slightly more succinct send_data().&lt;/p&gt;
&lt;p&gt;Today I ran into the same problem on one of my sinatra apps. I
see from ticket &lt;a href=&quot;/projects/9779/tickets/143&quot; title=
&quot;Ticket #143&quot;&gt;#143&lt;/a&gt; that send_data() was deprecated and is now
gone (while send_file() remains). However the solution suggested in
that ticket results in the problem I ran into on the Rails app, and
necessitates a streaming mechanism to be viable. I ended up
creating a simple stream class wrapping my array and implementing
#each(), and ending the sinatra callback with a &quot;halt
stream&quot;.&lt;br&gt;&lt;/p&gt;
&lt;p&gt;I don't know the reasoning behind deprecating send_data(), but
IMHO it was useful and worthwhile. Maybe there's some other
streaming facility I'm not aware of that doesn't require building a
huge contiguous string in memory? Otherwise it'd be great to have
it back..&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">17123</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">false</closed>
    <created-at type="datetime">2009-08-14T06:53:48-07:00</created-at>
    <creator-id type="integer">66277</creator-id>
    <milestone-due-on type="datetime">2012-12-31T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">27724</milestone-id>
    <number type="integer">274</number>
    <permalink>requests-for-same-route-different-request_method-should-return-http-405</permalink>
    <priority type="integer">34</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>open</state>
    <tag>http routing</tag>
    <title>Requests for same route, different REQUEST_METHOD should return HTTP 405</title>
    <updated-at type="datetime">2010-02-02T16:55:00-08:00</updated-at>
    <user-id type="integer">17123</user-id>
    <user-name>Ryan Tomayko</user-name>
    <creator-name>Nick</creator-name>
    <assigned-user-name>Ryan Tomayko</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/274</url>
    <milestone-title>Future</milestone-title>
    <original-body>A sinatra app like:

@@@ ruby
 get '/' do
  &quot;Foo&quot;
end
@@@
Will return a 404 response for PUT, POST, DELETE, etc requests - I believe it should return a 405 (BAD METHOD) code instead, and set the Accept: header of the response to be a comma-separated list of methods with a registered matching route.

Currently I'm implementing this in a before filter, as follows:
@@@ ruby
before do
  methods_with_routes = ['GET', 'POST', 'PUT', 'HEAD', 'DELETE'].select do |m|
    self.class.routes[m] &amp;&amp;
      self.class.routes[m].select {|r| request.path_info.match(r[0]) }.nitems &gt; 0
  end

  begin
    error_bad_method(methods_with_routes) unless methods_with_routes.include?(request.request_method)
  end unless methods_with_routes.empty?
end

helpers do
  def error_bad_method(good_methods = {})
    response['Allow'] = good_methods.map {|m| m.to_s.upcase }.join(', ')
    halt 405, &quot;Bad method&quot;
  end
end
@@@

Really, it's a bit of sugar, but it helps for some applications. Doing it in core would be more efficient than a before-filter, I suspect, 'though I've no idea how to make the latter happen. I've only been using sinatra for the past week or so :D</original-body>
    <latest-body>A sinatra app like:

@@@ ruby
 get '/' do
  &quot;Foo&quot;
end
@@@
Will return a 404 response for PUT, POST, DELETE, etc requests - I believe it should return a 405 (BAD METHOD) code instead, and set the Accept: header of the response to be a comma-separated list of methods with a registered matching route.

Currently I'm implementing this in a before filter, as follows:
@@@ ruby
before do
  methods_with_routes = ['GET', 'POST', 'PUT', 'HEAD', 'DELETE'].select do |m|
    self.class.routes[m] &amp;&amp;
      self.class.routes[m].select {|r| request.path_info.match(r[0]) }.nitems &gt; 0
  end

  begin
    error_bad_method(methods_with_routes) unless methods_with_routes.include?(request.request_method)
  end unless methods_with_routes.empty?
end

helpers do
  def error_bad_method(good_methods = {})
    response['Allow'] = good_methods.map {|m| m.to_s.upcase }.join(', ')
    halt 405, &quot;Bad method&quot;
  end
end
@@@

Really, it's a bit of sugar, but it helps for some applications. Doing it in core would be more efficient than a before-filter, I suspect, 'though I've no idea how to make the latter happen. I've only been using sinatra for the past week or so :D</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;A sinatra app like:&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;
 get '/' do
  &amp;quot;Foo&amp;quot;
end
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Will return a 404 response for PUT, POST, DELETE, etc requests -
I believe it should return a 405 (BAD METHOD) code instead, and set
the Accept: header of the response to be a comma-separated list of
methods with a registered matching route.&lt;/p&gt;
&lt;p&gt;Currently I'm implementing this in a before filter, as
follows:&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;
before do
  methods_with_routes = ['GET', 'POST', 'PUT', 'HEAD', 'DELETE'].select do |m|
    self.class.routes[m] &amp;amp;&amp;amp;
      self.class.routes[m].select {|r| request.path_info.match(r[0]) }.nitems &amp;gt; 0
  end

  begin
    error_bad_method(methods_with_routes) unless methods_with_routes.include?(request.request_method)
  end unless methods_with_routes.empty?
end

helpers do
  def error_bad_method(good_methods = {})
    response['Allow'] = good_methods.map {|m| m.to_s.upcase }.join(', ')
    halt 405, &amp;quot;Bad method&amp;quot;
  end
end
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Really, it's a bit of sugar, but it helps for some applications.
Doing it in core would be more efficient than a before-filter, I
suspect, 'though I've no idea how to make the latter happen. I've
only been using sinatra for the past week or so :D&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">17123</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2010-02-01T10:58:44-08:00</created-at>
    <creator-id type="integer">26790</creator-id>
    <milestone-due-on type="datetime">2010-02-08T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">41832</milestone-id>
    <number type="integer">322</number>
    <permalink>two-requests-to-the-same-location-when-using-sinatrabase</permalink>
    <priority type="integer">1</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>invalid</state>
    <tag>bug &quot;duplicate requests&quot; &quot;sinatra base&quot;</tag>
    <title>Two requests to the same location when using Sinatra::Base</title>
    <updated-at type="datetime">2010-02-02T00:56:25-08:00</updated-at>
    <user-id type="integer">17123</user-id>
    <user-name>Ryan Tomayko</user-name>
    <creator-name>Kieran P</creator-name>
    <assigned-user-name>Ryan Tomayko</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/322</url>
    <milestone-title>1.0</milestone-title>
    <original-body>The weirdest thing happened. I converted my single sinatra app file into a rack app (config.ru, run Application,  class Application &lt; Sinatra::Base). Anyway, it worked fine. Booted, loaded a page.

But it took a while. I looked at the logs. It was making two requests to each location. Each page, each image, even each favicon, twice loaded.

I reverted back to single file, and it went back to only one request.

Has anyone else experienced this issue?

The changes I made are here: http://github.com/KieranP/vboxweb_rb/commit/fa4c818d6eae2e8210cabe756056a70ef2914d92

Hopefully pretty standard.</original-body>
    <latest-body>The weirdest thing happened. I converted my single sinatra app file into a rack app (config.ru, run Application,  class Application &lt; Sinatra::Base). Anyway, it worked fine. Booted, loaded a page.

But it took a while. I looked at the logs. It was making two requests to each location. Each page, each image, even each favicon, twice loaded.

I reverted back to single file, and it went back to only one request.

Has anyone else experienced this issue?

The changes I made are here: http://github.com/KieranP/vboxweb_rb/commit/fa4c818d6eae2e8210cabe756056a70ef2914d92

Hopefully pretty standard.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;The weirdest thing happened. I converted my single sinatra app
file into a rack app (config.ru, run Application, class Application
&amp;lt; Sinatra::Base). Anyway, it worked fine. Booted, loaded a
page.&lt;/p&gt;
&lt;p&gt;But it took a while. I looked at the logs. It was making two
requests to each location. Each page, each image, even each
favicon, twice loaded.&lt;/p&gt;
&lt;p&gt;I reverted back to single file, and it went back to only one
request.&lt;/p&gt;
&lt;p&gt;Has anyone else experienced this issue?&lt;/p&gt;
&lt;p&gt;The changes I made are here: &lt;a href=
&quot;http://github.com/KieranP/vboxweb_rb/commit/fa4c818d6eae2e8210cabe756056a70ef2914d92&quot;&gt;
http://github.com/KieranP/vboxweb_rb/commit/fa4c818d6eae2e8210cabe7...&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hopefully pretty standard.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">17123</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">false</closed>
    <created-at type="datetime">2010-02-01T17:51:49-08:00</created-at>
    <creator-id type="integer">18387</creator-id>
    <milestone-due-on type="datetime">2010-02-08T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">41832</milestone-id>
    <number type="integer">323</number>
    <permalink>error-block-not-being-called-in-a-sinatrabase-app</permalink>
    <priority type="integer">2</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>new</state>
    <tag>error</tag>
    <title>error block not being called in a &quot;sinatra/base&quot; app</title>
    <updated-at type="datetime">2010-02-01T18:31:14-08:00</updated-at>
    <user-id type="integer">17123</user-id>
    <user-name>Ryan Tomayko</user-name>
    <creator-name>Alex Chaffee</creator-name>
    <assigned-user-name>Ryan Tomayko</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/323</url>
    <milestone-title>1.0</milestone-title>
    <original-body>The Sinatra Readme says, &quot;The error handler is invoked any time an exception is raised from a route block or a filter.&quot; And this is true inside a &quot;top level&quot; Sinatra app. But it isn't working in a &quot;base style&quot; Sinatra app -- I get a blank page in Firefox and in Safari it says &quot;Safari can&#8217;t open the page &#8220;http://localhost:4567/&#8221; because the server unexpectedly dropped the connection.&quot;

http://gist.github.com/292270

This also happens when run with thin via a config.ru file.</original-body>
    <latest-body>The Sinatra Readme says, &quot;The error handler is invoked any time an exception is raised from a route block or a filter.&quot; And this is true inside a &quot;top level&quot; Sinatra app. But it isn't working in a &quot;base style&quot; Sinatra app -- I get a blank page in Firefox and in Safari it says &quot;Safari can&#8217;t open the page &#8220;http://localhost:4567/&#8221; because the server unexpectedly dropped the connection.&quot;

http://gist.github.com/292270

This also happens when run with thin via a config.ru file.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;The Sinatra Readme says, &quot;The error handler is invoked any time
an exception is raised from a route block or a filter.&quot; And this is
true inside a &quot;top level&quot; Sinatra app. But it isn't working in a
&quot;base style&quot; Sinatra app -- I get a blank page in Firefox and in
Safari it says &quot;Safari can&amp;#8217;t open the page &amp;#8220;&lt;a href=
&quot;http://localhost:4567/%E2%80%9D&quot;&gt;http://localhost:4567/&amp;#8221;&lt;/a&gt;
because the server unexpectedly dropped the connection.&quot;&lt;/p&gt;
&lt;p&gt;&lt;a href=
&quot;http://gist.github.com/292270&quot;&gt;http://gist.github.com/292270&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This also happens when run with thin via a config.ru file.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">11306</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">false</closed>
    <created-at type="datetime">2009-10-04T06:31:15-07:00</created-at>
    <creator-id type="integer">11306</creator-id>
    <milestone-due-on type="datetime">2012-12-31T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">27724</milestone-id>
    <number type="integer">288</number>
    <permalink>fix-localjumperror-errors-on-jruby</permalink>
    <priority type="integer">4</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>new</state>
    <tag>jruby tilt</tag>
    <title>Fix LocalJumpError errors on jRuby</title>
    <updated-at type="datetime">2010-01-28T11:48:55-08:00</updated-at>
    <user-id type="integer">17123</user-id>
    <user-name>Ryan Tomayko</user-name>
    <creator-name>Simon Rozet</creator-name>
    <assigned-user-name>Simon Rozet</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/288</url>
    <milestone-title>Future</milestone-title>
    <original-body>`templates_test.rb` is currently failing under jRuby</original-body>
    <latest-body>`templates_test.rb` is currently failing under jRuby</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;&lt;code&gt;templates_test.rb&lt;/code&gt; is currently failing under
jRuby&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">11306</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">false</closed>
    <created-at type="datetime">2009-05-18T04:16:46-07:00</created-at>
    <creator-id type="integer">11306</creator-id>
    <milestone-due-on type="datetime">2012-12-31T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">27724</milestone-id>
    <number type="integer">230</number>
    <permalink>document-route-condition</permalink>
    <priority type="integer">3</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>new</state>
    <tag>doc</tag>
    <title>Document route condition</title>
    <updated-at type="datetime">2010-01-28T11:48:50-08:00</updated-at>
    <user-id type="integer">17123</user-id>
    <user-name>Ryan Tomayko</user-name>
    <creator-name>Simon Rozet</creator-name>
    <assigned-user-name>Simon Rozet</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/230</url>
    <milestone-title>Future</milestone-title>
    <original-body></original-body>
    <latest-body></latest-body>
    <original-body-html></original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">17123</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-12-22T19:15:23-08:00</created-at>
    <creator-id type="integer">17123</creator-id>
    <milestone-due-on type="datetime">2010-02-08T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">41832</milestone-id>
    <number type="integer">312</number>
    <permalink>obsolete-sinatradefault-or-not</permalink>
    <priority type="integer">2</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag nil="true"></tag>
    <title>Obsolete Sinatra::Default (or not)</title>
    <updated-at type="datetime">2010-01-28T11:48:33-08:00</updated-at>
    <user-id type="integer">17123</user-id>
    <user-name>Ryan Tomayko</user-name>
    <creator-name>Ryan Tomayko</creator-name>
    <assigned-user-name>Ryan Tomayko</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/312</url>
    <milestone-title>1.0</milestone-title>
    <original-body>This and #308 are the last major backward-compatibility issues blocking 1.0 that I'm aware of.

First, see #240 (Base vs. Default vs. Application) for discussion on why these classes existed in the first place and how they're being used today in the wild.

Here's a table that describes every single difference between each of the classes:

&lt;table border='1' cellpadding='5'&gt;
&lt;tr&gt;
  &lt;td&gt;Target for top-level routes, filters, options, and error handlers&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;Automatically register all extensions&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;th&gt;Behavior&lt;/th&gt;
  &lt;th&gt;Sinatra::Base&lt;/th&gt;
  &lt;th&gt;Sinatra::Default&lt;/th&gt;
  &lt;th&gt;Sinatra::Application&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;
    &lt;code&gt;:raise_errors&lt;/code&gt; - raises exceptions from &lt;code&gt;#call&lt;/code&gt;
    instead of returning an &lt;code&gt;[500, ...]&lt;/code&gt; error tuple.
  &lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;code&gt;:dump_errors&lt;/code&gt; - write exceptions to rack.errors&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;code&gt;:show_exceptions&lt;/code&gt; - don't raise exceptions, return development error page&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;code&gt;:logging&lt;/code&gt; - log requests to rack.errors&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;code&gt;:methodoverride&lt;/code&gt; - enable POST _method replacement&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;code&gt;:static&lt;/code&gt; - check for and serve static files&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;code&gt;:run&lt;/code&gt; - auto start server in at_exit hook&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

In #240, we decided to deprecate `Default` in preference to `Application` but, after discussing with sr a bit on IRC today, we're not sure obsoleting or aliasing to Application is feasible right now:

  * Note that aliasing Default to Application has only landed on master [7f5d4df](http://github.com/sinatra/sinatra/commit/7f5d4dfb8a2588fa888e48fbacf6d977a4cdbf3e) and hasn't went out in an official release so we have complete freedom to do whatever we want here.
  * No deprecation warning has been added to an 0.9.x release about `Default` going away in 1.0.
  * Default is used a lot in the wild. I'd estimate something like 50%-75% of class based apps subclass `Default` instead of `Base` or `Application`.
  * The behavior of `Default` is slightly different from that of `Application` (as can be seen in the table above). Most importantly, routes, filters, error handlers, or options set at the top-level are set on `Application` whereas this is not the case with `Default`. I don't think people subclassing `Default` would expect a route defined at the top-level to effect their class, so aliasing `Default` to `Application` (current behavior on master) seems wrong to me.

Further complicating matters is that neither sr or myself use `Default` and have always opted instead to subclass `Base` and set options explicitly. This is making it hard for us to judge the utility of `Default` and come up with a solution that works for people that do use `Default`.

Given all that, I think we have the following options:

  1. Don't deprecate/obsolete anything. Leave `Default` and `Application` exactly as they are in the table above / 0.9.x. This is is the least incompatible change but means we're going to spend the rest of our lives trying to explain the difference between all of these classes to people.

  2. Make `Default` an alias for `Application` (current master behavior). This is fairly compatible with 0.9.x and would let us tell people to use either `Base` or `Application` in the future.

  3. Make `Default` an alias for `Base` and make `Base` a bit more intelligent about default options. For example, we can enable `:show_exceptions` by default in the development environment and automatically enable `:static` when the `:public` option is set. This would make `Base` act a lot more like `Default` in cases where people expect it and is also basically compatible with 0.9.x.

Bottom line is we need Blake and others that care about `Default` to weigh in here with what makes the most sense to them and we need a decision for we can release 1.0.</original-body>
    <latest-body>This and #308 are the last major backward-compatibility issues blocking 1.0 that I'm aware of.

First, see #240 (Base vs. Default vs. Application) for discussion on why these classes existed in the first place and how they're being used today in the wild.

Here's a table that describes every single difference between each of the classes:

&lt;table border='1' cellpadding='5'&gt;
&lt;tr&gt;
  &lt;td&gt;Target for top-level routes, filters, options, and error handlers&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;Automatically register all extensions&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;th&gt;Behavior&lt;/th&gt;
  &lt;th&gt;Sinatra::Base&lt;/th&gt;
  &lt;th&gt;Sinatra::Default&lt;/th&gt;
  &lt;th&gt;Sinatra::Application&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;
    &lt;code&gt;:raise_errors&lt;/code&gt; - raises exceptions from &lt;code&gt;#call&lt;/code&gt;
    instead of returning an &lt;code&gt;[500, ...]&lt;/code&gt; error tuple.
  &lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;code&gt;:dump_errors&lt;/code&gt; - write exceptions to rack.errors&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;code&gt;:show_exceptions&lt;/code&gt; - don't raise exceptions, return development error page&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;code&gt;:logging&lt;/code&gt; - log requests to rack.errors&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;code&gt;:methodoverride&lt;/code&gt; - enable POST _method replacement&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;code&gt;:static&lt;/code&gt; - check for and serve static files&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;code&gt;:run&lt;/code&gt; - auto start server in at_exit hook&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

In #240, we decided to deprecate `Default` in preference to `Application` but, after discussing with sr a bit on IRC today, we're not sure obsoleting or aliasing to Application is feasible right now:

  * Note that aliasing Default to Application has only landed on master [7f5d4df](http://github.com/sinatra/sinatra/commit/7f5d4dfb8a2588fa888e48fbacf6d977a4cdbf3e) and hasn't went out in an official release so we have complete freedom to do whatever we want here.
  * No deprecation warning has been added to an 0.9.x release about `Default` going away in 1.0.
  * Default is used a lot in the wild. I'd estimate something like 50%-75% of class based apps subclass `Default` instead of `Base` or `Application`.
  * The behavior of `Default` is slightly different from that of `Application` (as can be seen in the table above). Most importantly, routes, filters, error handlers, or options set at the top-level are set on `Application` whereas this is not the case with `Default`. I don't think people subclassing `Default` would expect a route defined at the top-level to effect their class, so aliasing `Default` to `Application` (current behavior on master) seems wrong to me.

Further complicating matters is that neither sr or myself use `Default` and have always opted instead to subclass `Base` and set options explicitly. This is making it hard for us to judge the utility of `Default` and come up with a solution that works for people that do use `Default`.

Given all that, I think we have the following options:

  1. Don't deprecate/obsolete anything. Leave `Default` and `Application` exactly as they are in the table above / 0.9.x. This is is the least incompatible change but means we're going to spend the rest of our lives trying to explain the difference between all of these classes to people.

  2. Make `Default` an alias for `Application` (current master behavior). This is fairly compatible with 0.9.x and would let us tell people to use either `Base` or `Application` in the future.

  3. Make `Default` an alias for `Base` and make `Base` a bit more intelligent about default options. For example, we can enable `:show_exceptions` by default in the development environment and automatically enable `:static` when the `:public` option is set. This would make `Base` act a lot more like `Default` in cases where people expect it and is also basically compatible with 0.9.x.

Bottom line is we need Blake and others that care about `Default` to weigh in here with what makes the most sense to them and we need a decision for we can release 1.0.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;This and &lt;a href=&quot;/projects/9779/tickets/308&quot; title=
&quot;Ticket #308&quot;&gt;#308&lt;/a&gt; are the last major backward-compatibility
issues blocking 1.0 that I'm aware of.&lt;/p&gt;
&lt;p&gt;First, see &lt;a href=&quot;/projects/9779/tickets/240&quot; title=
&quot;Ticket #240&quot;&gt;#240&lt;/a&gt; (Base vs. Default vs. Application) for
discussion on why these classes existed in the first place and how
they're being used today in the wild.&lt;/p&gt;
&lt;p&gt;Here's a table that describes every single difference between
each of the classes:&lt;/p&gt;
&lt;table&gt;
&lt;tr&gt;
&lt;td&gt;Target for top-level routes, filters, options, and error
handlers&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Automatically register all extensions&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Behavior&lt;/th&gt;
&lt;th&gt;Sinatra::Base&lt;/th&gt;
&lt;th&gt;Sinatra::Default&lt;/th&gt;
&lt;th&gt;Sinatra::Application&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;:raise_errors&lt;/code&gt; - raises exceptions from
&lt;code&gt;#call&lt;/code&gt; instead of returning an &lt;code&gt;[500, ...]&lt;/code&gt;
error tuple.&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;:dump_errors&lt;/code&gt; - write exceptions to
rack.errors&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;:show_exceptions&lt;/code&gt; - don't raise exceptions, return
development error page&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;:logging&lt;/code&gt; - log requests to rack.errors&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;:methodoverride&lt;/code&gt; - enable POST _method
replacement&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;:static&lt;/code&gt; - check for and serve static files&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;:run&lt;/code&gt; - auto start server in at_exit hook&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;p&gt;In &lt;a href=&quot;/projects/9779/tickets/240&quot; title=
&quot;Ticket #240&quot;&gt;#240&lt;/a&gt;, we decided to deprecate
&lt;code&gt;Default&lt;/code&gt; in preference to &lt;code&gt;Application&lt;/code&gt; but,
after discussing with sr a bit on IRC today, we're not sure
obsoleting or aliasing to Application is feasible right now:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Note that aliasing Default to Application has only landed on
master &lt;a href=
&quot;http://github.com/sinatra/sinatra/commit/7f5d4dfb8a2588fa888e48fbacf6d977a4cdbf3e&quot;&gt;
7f5d4df&lt;/a&gt; and hasn't went out in an official release so we have
complete freedom to do whatever we want here.&lt;/li&gt;
&lt;li&gt;No deprecation warning has been added to an 0.9.x release about
&lt;code&gt;Default&lt;/code&gt; going away in 1.0.&lt;/li&gt;
&lt;li&gt;Default is used a lot in the wild. I'd estimate something like
50%-75% of class based apps subclass &lt;code&gt;Default&lt;/code&gt; instead
of &lt;code&gt;Base&lt;/code&gt; or &lt;code&gt;Application&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The behavior of &lt;code&gt;Default&lt;/code&gt; is slightly different from
that of &lt;code&gt;Application&lt;/code&gt; (as can be seen in the table
above). Most importantly, routes, filters, error handlers, or
options set at the top-level are set on &lt;code&gt;Application&lt;/code&gt;
whereas this is not the case with &lt;code&gt;Default&lt;/code&gt;. I don't
think people subclassing &lt;code&gt;Default&lt;/code&gt; would expect a route
defined at the top-level to effect their class, so aliasing
&lt;code&gt;Default&lt;/code&gt; to &lt;code&gt;Application&lt;/code&gt; (current behavior
on master) seems wrong to me.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Further complicating matters is that neither sr or myself use
&lt;code&gt;Default&lt;/code&gt; and have always opted instead to subclass
&lt;code&gt;Base&lt;/code&gt; and set options explicitly. This is making it
hard for us to judge the utility of &lt;code&gt;Default&lt;/code&gt; and come
up with a solution that works for people that do use
&lt;code&gt;Default&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Given all that, I think we have the following options:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Don't deprecate/obsolete anything. Leave &lt;code&gt;Default&lt;/code&gt;
and &lt;code&gt;Application&lt;/code&gt; exactly as they are in the table above
/ 0.9.x. This is is the least incompatible change but means we're
going to spend the rest of our lives trying to explain the
difference between all of these classes to people.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Make &lt;code&gt;Default&lt;/code&gt; an alias for &lt;code&gt;Application&lt;/code&gt;
(current master behavior). This is fairly compatible with 0.9.x and
would let us tell people to use either &lt;code&gt;Base&lt;/code&gt; or
&lt;code&gt;Application&lt;/code&gt; in the future.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Make &lt;code&gt;Default&lt;/code&gt; an alias for &lt;code&gt;Base&lt;/code&gt; and
make &lt;code&gt;Base&lt;/code&gt; a bit more intelligent about default
options. For example, we can enable &lt;code&gt;:show_exceptions&lt;/code&gt;
by default in the development environment and automatically enable
&lt;code&gt;:static&lt;/code&gt; when the &lt;code&gt;:public&lt;/code&gt; option is set.
This would make &lt;code&gt;Base&lt;/code&gt; act a lot more like
&lt;code&gt;Default&lt;/code&gt; in cases where people expect it and is also
basically compatible with 0.9.x.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Bottom line is we need Blake and others that care about
&lt;code&gt;Default&lt;/code&gt; to weigh in here with what makes the most
sense to them and we need a decision for we can release 1.0.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">17123</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2010-01-27T18:42:36-08:00</created-at>
    <creator-id type="integer">58615</creator-id>
    <milestone-due-on type="datetime">2010-02-08T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">41832</milestone-id>
    <number type="integer">321</number>
    <permalink>need-a-way-to-disable-tilt-want-non-caching-behavior-when-in-development</permalink>
    <priority type="integer">44</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag>&quot;sinatra tilt caching reloading&quot;</tag>
    <title>need a way to disable tilt (want non-caching behavior when in development)</title>
    <updated-at type="datetime">2010-01-28T10:09:06-08:00</updated-at>
    <user-id type="integer">58615</user-id>
    <user-name>Jordan Ritter</user-name>
    <creator-name>Jordan Ritter</creator-name>
    <assigned-user-name>Ryan Tomayko</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/321</url>
    <milestone-title>1.0</milestone-title>
    <original-body>I just updated to latest master (466cc74), which includes Tilt for caching my view templates.  This is awesome for production.

However, it looks like they're cached no matter what, regardless of RACK_ENV?  This results in a different behavior than before: I can't just tweak a template and have that change show up; I have to ^C/restart the app. Kind of a bummer.

(FYI, I don't use shotgun - I extend Rack::Reloader to properly handle the specifics of&#160;reloading my app files.)

I looked through the code and AFAICT there doesn't appear to be a way to disable this caching/Tilt.  Unless I've missed the mark on this, I'd suggest an enable/disable option for this, such that one could pop the desired setting into 'configure :development/:production' blocks like most of the other options.</original-body>
    <latest-body>I just updated to latest master (466cc74), which includes Tilt for caching my view templates.  This is awesome for production.

However, it looks like they're cached no matter what, regardless of RACK_ENV?  This results in a different behavior than before: I can't just tweak a template and have that change show up; I have to ^C/restart the app. Kind of a bummer.

(FYI, I don't use shotgun - I extend Rack::Reloader to properly handle the specifics of&#160;reloading my app files.)

I looked through the code and AFAICT there doesn't appear to be a way to disable this caching/Tilt.  Unless I've missed the mark on this, I'd suggest an enable/disable option for this, such that one could pop the desired setting into 'configure :development/:production' blocks like most of the other options.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;I just updated to latest master (466cc74), which includes Tilt
for caching my view templates. This is awesome for production.&lt;/p&gt;
&lt;p&gt;However, it looks like they're cached no matter what, regardless
of RACK_ENV? This results in a different behavior than before: I
can't just tweak a template and have that change show up; I have to
^C/restart the app. Kind of a bummer.&lt;/p&gt;
&lt;p&gt;(FYI, I don't use shotgun - I extend Rack::Reloader to properly
handle the specifics of&amp;nbsp;reloading my app files.)&lt;/p&gt;
&lt;p&gt;I looked through the code and AFAICT there doesn't appear to be
a way to disable this caching/Tilt. Unless I've missed the mark on
this, I'd suggest an enable/disable option for this, such that one
could pop the desired setting into 'configure
:development/:production' blocks like most of the other
options.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">17123</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2010-01-27T17:36:22-08:00</created-at>
    <creator-id type="integer">58615</creator-id>
    <milestone-due-on type="datetime">2010-02-08T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">41832</milestone-id>
    <number type="integer">320</number>
    <permalink>with-static-enabled-after-filters-always-run-while-before-filters-dont</permalink>
    <priority type="integer">3</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag>&quot;sinatra after before filter&quot;</tag>
    <title>with :static enabled, after filters always run while before filters don't</title>
    <updated-at type="datetime">2010-01-28T10:07:54-08:00</updated-at>
    <user-id type="integer">58615</user-id>
    <user-name>Jordan Ritter</user-name>
    <creator-name>Jordan Ritter</creator-name>
    <assigned-user-name>Ryan Tomayko</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/320</url>
    <milestone-title>1.0</milestone-title>
    <original-body>When:
 
 1. using a modular sinatra app (haven't tested classic fwiw)
 2. enabling :static, setting :public
 3. hitting a static file
 
Sinatra fires the after filter, but not the before filter.

Example script and output: http://gist.github.com/288331</original-body>
    <latest-body>When:
 
 1. using a modular sinatra app (haven't tested classic fwiw)
 2. enabling :static, setting :public
 3. hitting a static file
 
Sinatra fires the after filter, but not the before filter.

Example script and output: http://gist.github.com/288331</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;When:&lt;br&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;using a modular sinatra app (haven't tested classic fwiw)&lt;/li&gt;
&lt;li&gt;enabling :static, setting :public&lt;/li&gt;
&lt;li&gt;hitting a static file&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Sinatra fires the after filter, but not the before filter.&lt;/p&gt;
&lt;p&gt;Example script and output: &lt;a href=
&quot;http://gist.github.com/288331&quot;&gt;http://gist.github.com/288331&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer" nil="true"></assigned-user-id>
    <attachments-count type="integer">1</attachments-count>
    <closed type="boolean">false</closed>
    <created-at type="datetime">2008-06-09T01:09:02-07:00</created-at>
    <creator-id type="integer">9991</creator-id>
    <milestone-due-on type="datetime">2012-12-31T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">27724</milestone-id>
    <number type="integer">31</number>
    <permalink>nested-resources</permalink>
    <priority type="integer">2</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>new</state>
    <tag>&quot;feature patch&quot; routes routing</tag>
    <title>Nested resources</title>
    <updated-at type="datetime">2010-01-21T17:21:35-08:00</updated-at>
    <user-id type="integer">47545</user-id>
    <user-name>Mike (at coverallcrew)</user-name>
    <creator-name>Adam Wiggins</creator-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/31</url>
    <milestone-title>Future</milestone-title>
    <original-body>Ok here's the more controversial feature addition.  Feel free to shoot it down. :)

Nested resources:

@@@
resource 'posts' do
  get do
    # show all posts
  end

  post do
    # create new post
  end
end

resource 'posts/:id' do
  get do
    # show post params[:id]
  end

  delete do
    # destroy post params[:id]
  end

  get 'comments' do
    # show this post's comments
  end
end
@@@

The patch:

http://github.com/adamwiggins/sinatra/commit/b0b67602be141dcc835e91443e3120e5b1acbc9d

I was hesitant about this idea, since I do really like that typing &quot;egrep '^(get|put|post|delete)' myapp.rb&quot; returns all the full URLs.  But for larger apps, having a bit more organization is really nice.  And since it only adds ~20 lines of code and doesn't disrupt any existing syntax, it seemed like a net win overall.

Curious to hear feedback.</original-body>
    <latest-body>Ok here's the more controversial feature addition.  Feel free to shoot it down. :)

Nested resources:

@@@
resource 'posts' do
  get do
    # show all posts
  end

  post do
    # create new post
  end
end

resource 'posts/:id' do
  get do
    # show post params[:id]
  end

  delete do
    # destroy post params[:id]
  end

  get 'comments' do
    # show this post's comments
  end
end
@@@

The patch:

http://github.com/adamwiggins/sinatra/commit/b0b67602be141dcc835e91443e3120e5b1acbc9d

I was hesitant about this idea, since I do really like that typing &quot;egrep '^(get|put|post|delete)' myapp.rb&quot; returns all the full URLs.  But for larger apps, having a bit more organization is really nice.  And since it only adds ~20 lines of code and doesn't disrupt any existing syntax, it seemed like a net win overall.

Curious to hear feedback.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;
Ok here's the more controversial feature addition.  Feel free to shoot it down. :)
&lt;/p&gt;&lt;p&gt;
Nested resources:
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;&quot;&gt;resource 'posts' do
  get do
    # show all posts
  end

  post do
    # create new post
  end
end

resource 'posts/:id' do
  get do
    # show post params[:id]
  end

  delete do
    # destroy post params[:id]
  end

  get 'comments' do
    # show this post's comments
  end
end&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
The patch:
&lt;/p&gt;&lt;p&gt;
&lt;a href=&quot;http://github.com/adamwiggins/sinatra/commit/b0b67602be141dcc835e91443e3120e5b1acbc9d&quot;&gt;http://github.com/adamwiggins/si...&lt;/a&gt;
&lt;/p&gt;&lt;p&gt;
I was hesitant about this idea, since I do really like that typing &quot;egrep '^(get|put|post|delete)' myapp.rb&quot; returns all the full URLs.  But for larger apps, having a bit more organization is really nice.  And since it only adds ~20 lines of code and doesn't disrupt any existing syntax, it seemed like a net win overall.
&lt;/p&gt;&lt;p&gt;
Curious to hear feedback.
&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">17123</assigned-user-id>
    <attachments-count type="integer">2</attachments-count>
    <closed type="boolean">false</closed>
    <created-at type="datetime">2010-01-18T09:44:09-08:00</created-at>
    <creator-id type="integer">83099</creator-id>
    <milestone-due-on type="datetime">2012-12-31T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">27724</milestone-id>
    <number type="integer">319</number>
    <permalink>marshaldump-chokes-on-params-hash</permalink>
    <priority type="integer">36</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>new</state>
    <tag nil="true"></tag>
    <title>Marshal.dump chokes on params hash</title>
    <updated-at type="datetime">2010-01-18T21:19:20-08:00</updated-at>
    <user-id type="integer">17123</user-id>
    <user-name>Ryan Tomayko</user-name>
    <creator-name>Jeremy Stephens</creator-name>
    <assigned-user-name>Ryan Tomayko</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/319</url>
    <milestone-title>Future</milestone-title>
    <original-body>Marshal.dump is unable to handle the hash returned by the params method when posting.  Attached is a test case.  I tried this in Rack with no problems.</original-body>
    <latest-body>Marshal.dump is unable to handle the hash returned by the params method when posting.  Attached is a test case.  I tried this in Rack with no problems.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;Marshal.dump is unable to handle the hash returned by the params
method when posting. Attached is a test case. I tried this in Rack
with no problems.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">17123</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">false</closed>
    <created-at type="datetime">2009-12-09T07:01:59-08:00</created-at>
    <creator-id type="integer">75124</creator-id>
    <milestone-due-on type="datetime">2012-12-31T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">27724</milestone-id>
    <number type="integer">306</number>
    <permalink>added-middleware-example-to-readme</permalink>
    <priority type="integer">35</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>new</state>
    <tag>doc</tag>
    <title>Added middleware example to README</title>
    <updated-at type="datetime">2010-01-16T04:12:28-08:00</updated-at>
    <user-id type="integer">17123</user-id>
    <user-name>Ryan Tomayko</user-name>
    <creator-name>Bill Gathen</creator-name>
    <assigned-user-name>Ryan Tomayko</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/306</url>
    <milestone-title>Future</milestone-title>
    <original-body>I added an example of using Sinatra for non-endpoint middleware, using +forward+.

My fork is at billgathen/sinatra on GitHub.

My first contribution, so forgive me if I'm doing this wrong. :-)

- Bill</original-body>
    <latest-body>I added an example of using Sinatra for non-endpoint middleware, using +forward+.

My fork is at billgathen/sinatra on GitHub.

My first contribution, so forgive me if I'm doing this wrong. :-)

- Bill</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;I added an example of using Sinatra for non-endpoint middleware,
using +forward+.&lt;/p&gt;
&lt;p&gt;My fork is at billgathen/sinatra on GitHub.&lt;/p&gt;
&lt;p&gt;My first contribution, so forgive me if I'm doing this wrong.
:-)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Bill&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">17123</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-12-11T14:50:08-08:00</created-at>
    <creator-id type="integer">17123</creator-id>
    <milestone-due-on type="datetime">2010-02-08T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">41832</milestone-id>
    <number type="integer">310</number>
    <permalink>sinatra-10-faq</permalink>
    <priority type="integer">41</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag nil="true"></tag>
    <title>Sinatra 1.0 FAQ</title>
    <updated-at type="datetime">2010-01-16T04:11:57-08:00</updated-at>
    <user-id type="integer">17123</user-id>
    <user-name>Ryan Tomayko</user-name>
    <creator-name>Ryan Tomayko</creator-name>
    <assigned-user-name>Ryan Tomayko</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/310</url>
    <milestone-title>1.0</milestone-title>
    <original-body>I've started putting together a FAQ for 1.0:

http://rtomayko.github.com/draft/sinatra-one-oh-faq.html

I'm move this over to sinatra.github.com shortly (unlinked) so we can collab on it. For now, I'm hoping to get a list of things that should be mentioned logged here.</original-body>
    <latest-body>I've started putting together a FAQ for 1.0:

http://rtomayko.github.com/draft/sinatra-one-oh-faq.html

I'm move this over to sinatra.github.com shortly (unlinked) so we can collab on it. For now, I'm hoping to get a list of things that should be mentioned logged here.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;I've started putting together a FAQ for 1.0:&lt;/p&gt;
&lt;p&gt;&lt;a href=
&quot;http://rtomayko.github.com/draft/sinatra-one-oh-faq.html&quot;&gt;http://rtomayko.github.com/draft/sinatra-one-oh-faq.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I'm move this over to sinatra.github.com shortly (unlinked) so
we can collab on it. For now, I'm hoping to get a list of things
that should be mentioned logged here.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">11306</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-12-29T15:43:43-08:00</created-at>
    <creator-id type="integer">43313</creator-id>
    <milestone-due-on type="datetime">2010-02-08T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">41832</milestone-id>
    <number type="integer">316</number>
    <permalink>disable-logger-is-ignored-on-webrick</permalink>
    <priority type="integer">35</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>invalid</state>
    <tag nil="true"></tag>
    <title>`disable :logging` is ignored on webrick</title>
    <updated-at type="datetime">2010-01-15T21:16:26-08:00</updated-at>
    <user-id type="integer">43313</user-id>
    <user-name>ujihisa</user-name>
    <creator-name>ujihisa</creator-name>
    <assigned-user-name>Simon Rozet</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/316</url>
    <milestone-title>1.0</milestone-title>
    <original-body>Both in Sinatra 0.9.4 and the git trunk 6c9488e22a9ca76b66c31e74ee26f737ba0e87cb,
`disable :logger` is ignored when Sinatra uses Webrick.


On 0.9.4:

@@@ ruby
    require 'rubygems'
    require 'sinatra'
    set :server, 'webrick'
    disable :logger
    get '/' do
      ''
    end
@@@

    $ ruby -v b.rb
    ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9]
    == Sinatra/0.9.4 has taken the stage on 4567 for development with backup from WEBrick
    [2009-12-29 15:40:16] INFO  WEBrick 1.3.1
    [2009-12-29 15:40:16] INFO  ruby 1.8.7 (2009-06-12) [i686-darwin9]
    [2009-12-29 15:40:16] INFO  WEBrick::HTTPServer#start: pid=6453 port=4567
    127.0.0.1 - - [29/Dec/2009 15:40:26] &quot;GET / HTTP/1.1&quot; 200 - 0.0004
    localhost - - [29/Dec/2009:15:40:26 PST] &quot;GET / HTTP/1.1&quot; 200 0
    - -&gt; /
    127.0.0.1 - - [29/Dec/2009 15:40:26] &quot;GET / HTTP/1.1&quot; 200 - 0.0009
    localhost - - [29/Dec/2009:15:40:26 PST] &quot;GET / HTTP/1.1&quot; 200 0
    - -&gt; /
    ^C
    == Sinatra has ended his set (crowd applauds)
    [2009-12-29 15:40:30] INFO  going to shutdown ...
    [2009-12-29 15:40:30] INFO  WEBrick::HTTPServer#start done.

On Trunk:

@@@ ruby
    def require_vendor(o)
      o = o.to_s
      $: &lt;&lt; o
      $: &lt;&lt; o + '/lib'
      require o
    end

    require_vendor :rack
    require_vendor :sinatra
    disable :logger

    get '/' do
      ''
    end
@@@

    $ ruby -v a.rb
    ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9]
    == Sinatra/0.10.1 has taken the stage on 4567 for development with backup from WEBrick
    [2009-12-29 15:42:32] INFO  WEBrick 1.3.1
    [2009-12-29 15:42:32] INFO  ruby 1.8.7 (2009-06-12) [i686-darwin9]
    [2009-12-29 15:42:32] INFO  WEBrick::HTTPServer#start: pid=6456 port=4567
    127.0.0.1 - - [29/Dec/2009 15:42:35] &quot;GET / HTTP/1.1&quot; 200 - 0.0007
    localhost - - [29/Dec/2009:15:42:35 PST] &quot;GET / HTTP/1.1&quot; 200 0
    - -&gt; /
    127.0.0.1 - - [29/Dec/2009 15:42:35] &quot;GET /favicon.ico HTTP/1.1&quot; 404 420 0.0006
    localhost - - [29/Dec/2009:15:42:35 PST] &quot;GET /favicon.ico HTTP/1.1&quot; 404 420
    http://localhost:4567/ -&gt; /favicon.ico
    127.0.0.1 - - [29/Dec/2009 15:42:35] &quot;GET / HTTP/1.1&quot; 200 - 0.0006
    localhost - - [29/Dec/2009:15:42:35 PST] &quot;GET / HTTP/1.1&quot; 200 0
    - -&gt; /
    127.0.0.1 - - [29/Dec/2009 15:42:35] &quot;GET /favicon.ico HTTP/1.1&quot; 404 420 0.0006
    localhost - - [29/Dec/2009:15:42:35 PST] &quot;GET /favicon.ico HTTP/1.1&quot; 404 420
    http://localhost:4567/ -&gt; /favicon.ico
    ^C
    == Sinatra has ended his set (crowd applauds)
    [2009-12-29 15:42:39] INFO  going to shutdown ...
    [2009-12-29 15:42:39] INFO  WEBrick::HTTPServer#start done.</original-body>
    <latest-body>Both in Sinatra 0.9.4 and the git trunk 6c9488e22a9ca76b66c31e74ee26f737ba0e87cb,
`disable :logger` is ignored when Sinatra uses Webrick.


On 0.9.4:

@@@ ruby
    require 'rubygems'
    require 'sinatra'
    set :server, 'webrick'
    disable :logger
    get '/' do
      ''
    end
@@@

    $ ruby -v b.rb
    ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9]
    == Sinatra/0.9.4 has taken the stage on 4567 for development with backup from WEBrick
    [2009-12-29 15:40:16] INFO  WEBrick 1.3.1
    [2009-12-29 15:40:16] INFO  ruby 1.8.7 (2009-06-12) [i686-darwin9]
    [2009-12-29 15:40:16] INFO  WEBrick::HTTPServer#start: pid=6453 port=4567
    127.0.0.1 - - [29/Dec/2009 15:40:26] &quot;GET / HTTP/1.1&quot; 200 - 0.0004
    localhost - - [29/Dec/2009:15:40:26 PST] &quot;GET / HTTP/1.1&quot; 200 0
    - -&gt; /
    127.0.0.1 - - [29/Dec/2009 15:40:26] &quot;GET / HTTP/1.1&quot; 200 - 0.0009
    localhost - - [29/Dec/2009:15:40:26 PST] &quot;GET / HTTP/1.1&quot; 200 0
    - -&gt; /
    ^C
    == Sinatra has ended his set (crowd applauds)
    [2009-12-29 15:40:30] INFO  going to shutdown ...
    [2009-12-29 15:40:30] INFO  WEBrick::HTTPServer#start done.

On Trunk:

@@@ ruby
    def require_vendor(o)
      o = o.to_s
      $: &lt;&lt; o
      $: &lt;&lt; o + '/lib'
      require o
    end

    require_vendor :rack
    require_vendor :sinatra
    disable :logger

    get '/' do
      ''
    end
@@@

    $ ruby -v a.rb
    ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9]
    == Sinatra/0.10.1 has taken the stage on 4567 for development with backup from WEBrick
    [2009-12-29 15:42:32] INFO  WEBrick 1.3.1
    [2009-12-29 15:42:32] INFO  ruby 1.8.7 (2009-06-12) [i686-darwin9]
    [2009-12-29 15:42:32] INFO  WEBrick::HTTPServer#start: pid=6456 port=4567
    127.0.0.1 - - [29/Dec/2009 15:42:35] &quot;GET / HTTP/1.1&quot; 200 - 0.0007
    localhost - - [29/Dec/2009:15:42:35 PST] &quot;GET / HTTP/1.1&quot; 200 0
    - -&gt; /
    127.0.0.1 - - [29/Dec/2009 15:42:35] &quot;GET /favicon.ico HTTP/1.1&quot; 404 420 0.0006
    localhost - - [29/Dec/2009:15:42:35 PST] &quot;GET /favicon.ico HTTP/1.1&quot; 404 420
    http://localhost:4567/ -&gt; /favicon.ico
    127.0.0.1 - - [29/Dec/2009 15:42:35] &quot;GET / HTTP/1.1&quot; 200 - 0.0006
    localhost - - [29/Dec/2009:15:42:35 PST] &quot;GET / HTTP/1.1&quot; 200 0
    - -&gt; /
    127.0.0.1 - - [29/Dec/2009 15:42:35] &quot;GET /favicon.ico HTTP/1.1&quot; 404 420 0.0006
    localhost - - [29/Dec/2009:15:42:35 PST] &quot;GET /favicon.ico HTTP/1.1&quot; 404 420
    http://localhost:4567/ -&gt; /favicon.ico
    ^C
    == Sinatra has ended his set (crowd applauds)
    [2009-12-29 15:42:39] INFO  going to shutdown ...
    [2009-12-29 15:42:39] INFO  WEBrick::HTTPServer#start done.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;Both in Sinatra 0.9.4 and the git trunk
6c9488e22a9ca76b66c31e74ee26f737ba0e87cb,&lt;br&gt;
&lt;code&gt;disable :logger&lt;/code&gt; is ignored when Sinatra uses
Webrick.&lt;/p&gt;
&lt;p&gt;On 0.9.4:&lt;/p&gt;
&lt;pre&gt;
&lt;code class=&quot;ruby&quot;&gt;    require 'rubygems'
    require 'sinatra'
    set :server, 'webrick'
    disable :logger
    get '/' do
      ''
    end&lt;/code&gt;
&lt;/pre&gt;
&lt;pre&gt;
&lt;code&gt;$ ruby -v b.rb
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9]
== Sinatra/0.9.4 has taken the stage on 4567 for development with backup from WEBrick
[2009-12-29 15:40:16] INFO  WEBrick 1.3.1
[2009-12-29 15:40:16] INFO  ruby 1.8.7 (2009-06-12) [i686-darwin9]
[2009-12-29 15:40:16] INFO  WEBrick::HTTPServer#start: pid=6453 port=4567
127.0.0.1 - - [29/Dec/2009 15:40:26] &quot;GET / HTTP/1.1&quot; 200 - 0.0004
localhost - - [29/Dec/2009:15:40:26 PST] &quot;GET / HTTP/1.1&quot; 200 0
- -&amp;gt; /
127.0.0.1 - - [29/Dec/2009 15:40:26] &quot;GET / HTTP/1.1&quot; 200 - 0.0009
localhost - - [29/Dec/2009:15:40:26 PST] &quot;GET / HTTP/1.1&quot; 200 0
- -&amp;gt; /
^C
== Sinatra has ended his set (crowd applauds)
[2009-12-29 15:40:30] INFO  going to shutdown ...
[2009-12-29 15:40:30] INFO  WEBrick::HTTPServer#start done.&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;On Trunk:&lt;/p&gt;
&lt;pre&gt;
&lt;code class=&quot;ruby&quot;&gt;    def require_vendor(o)
      o = o.to_s
      $: &amp;lt;&amp;lt; o
      $: &amp;lt;&amp;lt; o + '/lib'
      require o
    end

    require_vendor :rack
    require_vendor :sinatra
    disable :logger

    get '/' do
      ''
    end&lt;/code&gt;
&lt;/pre&gt;
&lt;pre&gt;
&lt;code&gt;$ ruby -v a.rb
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9]
== Sinatra/0.10.1 has taken the stage on 4567 for development with backup from WEBrick
[2009-12-29 15:42:32] INFO  WEBrick 1.3.1
[2009-12-29 15:42:32] INFO  ruby 1.8.7 (2009-06-12) [i686-darwin9]
[2009-12-29 15:42:32] INFO  WEBrick::HTTPServer#start: pid=6456 port=4567
127.0.0.1 - - [29/Dec/2009 15:42:35] &quot;GET / HTTP/1.1&quot; 200 - 0.0007
localhost - - [29/Dec/2009:15:42:35 PST] &quot;GET / HTTP/1.1&quot; 200 0
- -&amp;gt; /
127.0.0.1 - - [29/Dec/2009 15:42:35] &quot;GET /favicon.ico HTTP/1.1&quot; 404 420 0.0006
localhost - - [29/Dec/2009:15:42:35 PST] &quot;GET /favicon.ico HTTP/1.1&quot; 404 420
http://localhost:4567/ -&amp;gt; /favicon.ico
127.0.0.1 - - [29/Dec/2009 15:42:35] &quot;GET / HTTP/1.1&quot; 200 - 0.0006
localhost - - [29/Dec/2009:15:42:35 PST] &quot;GET / HTTP/1.1&quot; 200 0
- -&amp;gt; /
127.0.0.1 - - [29/Dec/2009 15:42:35] &quot;GET /favicon.ico HTTP/1.1&quot; 404 420 0.0006
localhost - - [29/Dec/2009:15:42:35 PST] &quot;GET /favicon.ico HTTP/1.1&quot; 404 420
http://localhost:4567/ -&amp;gt; /favicon.ico
^C
== Sinatra has ended his set (crowd applauds)
[2009-12-29 15:42:39] INFO  going to shutdown ...
[2009-12-29 15:42:39] INFO  WEBrick::HTTPServer#start done.&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">17123</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-12-14T01:10:39-08:00</created-at>
    <creator-id type="integer">25849</creator-id>
    <milestone-due-on type="datetime">2010-02-08T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">41832</milestone-id>
    <number type="integer">311</number>
    <permalink>192-and-lambda-argument-to-route_eval</permalink>
    <priority type="integer">4</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag nil="true"></tag>
    <title>1.9.2 and lambda argument to #route_eval</title>
    <updated-at type="datetime">2010-01-15T05:56:17-08:00</updated-at>
    <user-id type="integer">25849</user-id>
    <user-name>Lourens Naud&#233;</user-name>
    <creator-name>Lourens Naud&#233;</creator-name>
    <assigned-user-name>Ryan Tomayko</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/311</url>
    <milestone-title>1.0</milestone-title>
    <original-body>Hi,

I had an issue over the weekend with Ruby 1.9.2 trunk's recent changeset that aligns instance_eval etc. with the 1.8 implementation.

Reported here :
http://redmine.ruby-lang.org/issues/show/2476 

Suggestion being to let the block passed be a Proc, and not a lambda :
 # Run a route block and throw :halt with the result.
    def route_eval(&amp;block)
      throw :halt, instance_eval(&amp;block)
    end</original-body>
    <latest-body>Hi,

I had an issue over the weekend with Ruby 1.9.2 trunk's recent changeset that aligns instance_eval etc. with the 1.8 implementation.

Reported here :
http://redmine.ruby-lang.org/issues/show/2476 

Suggestion being to let the block passed be a Proc, and not a lambda :
 # Run a route block and throw :halt with the result.
    def route_eval(&amp;block)
      throw :halt, instance_eval(&amp;block)
    end</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I had an issue over the weekend with Ruby 1.9.2 trunk's recent
changeset that aligns instance_eval etc. with the 1.8
implementation.&lt;/p&gt;
&lt;p&gt;Reported here :&lt;br&gt;
&lt;a href=
&quot;http://redmine.ruby-lang.org/issues/show/2476&quot;&gt;http://redmine.ruby-lang.org/issues/show/2476&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Suggestion being to let the block passed be a Proc, and not a
lambda :&lt;br&gt;
# Run a route block and throw :halt with the result.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;def route_eval(&amp;amp;block)
  throw :halt, instance_eval(&amp;amp;block)
end&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">17123</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-12-29T16:11:14-08:00</created-at>
    <creator-id type="integer">43313</creator-id>
    <milestone-due-on type="datetime">2010-02-08T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">41832</milestone-id>
    <number type="integer">317</number>
    <permalink>sinatra-doesnt-work-on-ruby-192</permalink>
    <priority type="integer">40</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>dupe</state>
    <tag nil="true"></tag>
    <title>Sinatra Doesn't Work on Ruby 1.9.2</title>
    <updated-at type="datetime">2010-01-15T05:16:44-08:00</updated-at>
    <user-id type="integer">17123</user-id>
    <user-name>Ryan Tomayko</user-name>
    <creator-name>ujihisa</creator-name>
    <assigned-user-name>Ryan Tomayko</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/317</url>
    <milestone-title>1.0</milestone-title>
    <original-body>Both Sinatra 0.9.4 and the git trunk cannot run well on Ruby trunk.

@@@ ruby
    require 'rubygems'
    require 'sinatra'
    set :server, 'webrick'
    disable :logger
    get '/' do
      ''
    end
@@@

    $ ruby192 -v b.rb
    ruby 1.9.2dev (2009-12-29 trunk 26197) [i386-darwin9.8.0]
    /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:948: warning: method redefined; discarding old run
    /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:1057: warning: previous definition of run was here
    /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:948: warning: method redefined; discarding old run?
    /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:625: warning: previous definition of run? was here
    /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:948: warning: method redefined; discarding old run=
    /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:626: warning: previous definition of run= was here
    /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/compat.rb:14: warning: shadowing outer local variable - line
    /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/compat.rb:41: warning: shadowing outer local variable - hash
    == Sinatra/0.9.4 has taken the stage on 4567 for development with backup from WEBrick
    [2009-12-29 16:04:11] INFO  WEBrick 1.3.1
    [2009-12-29 16:04:11] INFO  ruby 1.9.2 (2009-12-29) [i386-darwin9.8.0]
    [2009-12-29 16:04:11] INFO  WEBrick::HTTPServer#start: pid=8723 port=4567
    ArgumentError - wrong number of arguments (1 for 0):
     /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
     /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
     /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'ArgumentError: wrong number of arguments (1 for 0)
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:474:in `instance_eval'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:474:in `route_eval'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:463:in `block (2 levels) in route!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:460:in `catch'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:460:in `block in route!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:439:in `each'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:439:in `route!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:555:in `dispatch!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:375:in `block in call!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `instance_eval'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `block in invoke'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `catch'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `invoke'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/compat.rb:138:in `invoke'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:375:in `call!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:364:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/showexceptions.rb:24:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/commonlogger.rb:20:in `_call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/commonlogger.rb:13:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `block in call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:943:in `synchronize'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/content_length.rb:13:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/handler/webrick.rb:50:in `service'
            /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
            /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
            /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
    127.0.0.1 - - [29/Dec/2009 16:04:23] &quot;GET / HTTP/1.1&quot; 500 82483 0.2460
    localhost - - [29/Dec/2009:16:04:23 PST] &quot;GET / HTTP/1.1&quot; 500 82483
    - -&gt; /
    ArgumentError - wrong number of arguments (1 for 0):
     /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
     /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
     /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'ArgumentError: wrong number of arguments (1 for 0)
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:474:in `instance_eval'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:474:in `route_eval'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:463:in `block (2 levels) in route!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:460:in `catch'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:460:in `block in route!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:439:in `each'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:439:in `route!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:555:in `dispatch!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:375:in `block in call!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `instance_eval'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `block in invoke'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `catch'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `invoke'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/compat.rb:138:in `invoke'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:375:in `call!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:364:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/showexceptions.rb:24:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/commonlogger.rb:20:in `_call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/commonlogger.rb:13:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `block in call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:943:in `synchronize'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/content_length.rb:13:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/handler/webrick.rb:50:in `service'
            /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
            /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
            /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
    127.0.0.1 - - [29/Dec/2009 16:04:24] &quot;GET /__sinatra__/500.png HTTP/1.1&quot; 500 82611 0.3827
    localhost - - [29/Dec/2009:16:04:23 PST] &quot;GET /__sinatra__/500.png HTTP/1.1&quot; 500 82611
    http://localhost:4567/ -&gt; /__sinatra__/500.png
    ArgumentError - wrong number of arguments (1 for 0):
     /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
     /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
     /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'ArgumentError: wrong number of arguments (1 for 0)
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:474:in `instance_eval'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:474:in `route_eval'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:463:in `block (2 levels) in route!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:460:in `catch'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:460:in `block in route!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:439:in `each'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:439:in `route!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:555:in `dispatch!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:375:in `block in call!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `instance_eval'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `block in invoke'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `catch'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `invoke'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/compat.rb:138:in `invoke'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:375:in `call!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:364:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/showexceptions.rb:24:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/commonlogger.rb:20:in `_call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/commonlogger.rb:13:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `block in call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:943:in `synchronize'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/content_length.rb:13:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/handler/webrick.rb:50:in `service'
            /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
            /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
            /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
    127.0.0.1 - - [29/Dec/2009 16:04:24] &quot;GET /favicon.ico HTTP/1.1&quot; 500 82579 0.3136
    localhost - - [29/Dec/2009:16:04:24 PST] &quot;GET /favicon.ico HTTP/1.1&quot; 500 82579
    http://localhost:4567/ -&gt; /favicon.ico
    ^C
    == Sinatra has ended his set (crowd applauds)
    [2009-12-29 16:04:29] INFO  going to shutdown ...
    [2009-12-29 16:04:29] INFO  WEBrick::HTTPServer#start done.
    /tmp/thins</original-body>
    <latest-body>Both Sinatra 0.9.4 and the git trunk cannot run well on Ruby trunk.

@@@ ruby
    require 'rubygems'
    require 'sinatra'
    set :server, 'webrick'
    disable :logger
    get '/' do
      ''
    end
@@@

    $ ruby192 -v b.rb
    ruby 1.9.2dev (2009-12-29 trunk 26197) [i386-darwin9.8.0]
    /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:948: warning: method redefined; discarding old run
    /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:1057: warning: previous definition of run was here
    /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:948: warning: method redefined; discarding old run?
    /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:625: warning: previous definition of run? was here
    /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:948: warning: method redefined; discarding old run=
    /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:626: warning: previous definition of run= was here
    /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/compat.rb:14: warning: shadowing outer local variable - line
    /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/compat.rb:41: warning: shadowing outer local variable - hash
    == Sinatra/0.9.4 has taken the stage on 4567 for development with backup from WEBrick
    [2009-12-29 16:04:11] INFO  WEBrick 1.3.1
    [2009-12-29 16:04:11] INFO  ruby 1.9.2 (2009-12-29) [i386-darwin9.8.0]
    [2009-12-29 16:04:11] INFO  WEBrick::HTTPServer#start: pid=8723 port=4567
    ArgumentError - wrong number of arguments (1 for 0):
     /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
     /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
     /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'ArgumentError: wrong number of arguments (1 for 0)
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:474:in `instance_eval'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:474:in `route_eval'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:463:in `block (2 levels) in route!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:460:in `catch'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:460:in `block in route!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:439:in `each'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:439:in `route!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:555:in `dispatch!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:375:in `block in call!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `instance_eval'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `block in invoke'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `catch'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `invoke'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/compat.rb:138:in `invoke'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:375:in `call!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:364:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/showexceptions.rb:24:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/commonlogger.rb:20:in `_call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/commonlogger.rb:13:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `block in call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:943:in `synchronize'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/content_length.rb:13:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/handler/webrick.rb:50:in `service'
            /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
            /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
            /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
    127.0.0.1 - - [29/Dec/2009 16:04:23] &quot;GET / HTTP/1.1&quot; 500 82483 0.2460
    localhost - - [29/Dec/2009:16:04:23 PST] &quot;GET / HTTP/1.1&quot; 500 82483
    - -&gt; /
    ArgumentError - wrong number of arguments (1 for 0):
     /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
     /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
     /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'ArgumentError: wrong number of arguments (1 for 0)
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:474:in `instance_eval'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:474:in `route_eval'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:463:in `block (2 levels) in route!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:460:in `catch'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:460:in `block in route!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:439:in `each'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:439:in `route!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:555:in `dispatch!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:375:in `block in call!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `instance_eval'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `block in invoke'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `catch'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `invoke'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/compat.rb:138:in `invoke'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:375:in `call!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:364:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/showexceptions.rb:24:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/commonlogger.rb:20:in `_call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/commonlogger.rb:13:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `block in call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:943:in `synchronize'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/content_length.rb:13:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/handler/webrick.rb:50:in `service'
            /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
            /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
            /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
    127.0.0.1 - - [29/Dec/2009 16:04:24] &quot;GET /__sinatra__/500.png HTTP/1.1&quot; 500 82611 0.3827
    localhost - - [29/Dec/2009:16:04:23 PST] &quot;GET /__sinatra__/500.png HTTP/1.1&quot; 500 82611
    http://localhost:4567/ -&gt; /__sinatra__/500.png
    ArgumentError - wrong number of arguments (1 for 0):
     /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
     /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
     /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'ArgumentError: wrong number of arguments (1 for 0)
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:474:in `instance_eval'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:474:in `route_eval'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:463:in `block (2 levels) in route!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:460:in `catch'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:460:in `block in route!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:439:in `each'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:439:in `route!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:555:in `dispatch!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:375:in `block in call!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `instance_eval'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `block in invoke'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `catch'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `invoke'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/compat.rb:138:in `invoke'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:375:in `call!'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:364:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/showexceptions.rb:24:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/commonlogger.rb:20:in `_call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/commonlogger.rb:13:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `block in call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:943:in `synchronize'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/content_length.rb:13:in `call'
            /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/handler/webrick.rb:50:in `service'
            /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
            /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
            /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
    127.0.0.1 - - [29/Dec/2009 16:04:24] &quot;GET /favicon.ico HTTP/1.1&quot; 500 82579 0.3136
    localhost - - [29/Dec/2009:16:04:24 PST] &quot;GET /favicon.ico HTTP/1.1&quot; 500 82579
    http://localhost:4567/ -&gt; /favicon.ico
    ^C
    == Sinatra has ended his set (crowd applauds)
    [2009-12-29 16:04:29] INFO  going to shutdown ...
    [2009-12-29 16:04:29] INFO  WEBrick::HTTPServer#start done.
    /tmp/thins</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;Both Sinatra 0.9.4 and the git trunk cannot run well on Ruby
trunk.&lt;/p&gt;
&lt;pre&gt;
&lt;code class=&quot;ruby&quot;&gt;    require 'rubygems'
    require 'sinatra'
    set :server, 'webrick'
    disable :logger
    get '/' do
      ''
    end&lt;/code&gt;
&lt;/pre&gt;
&lt;pre&gt;
&lt;code&gt;$ ruby192 -v b.rb
ruby 1.9.2dev (2009-12-29 trunk 26197) [i386-darwin9.8.0]
/Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:948: warning: method redefined; discarding old run
/Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:1057: warning: previous definition of run was here
/Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:948: warning: method redefined; discarding old run?
/Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:625: warning: previous definition of run? was here
/Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:948: warning: method redefined; discarding old run=
/Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:626: warning: previous definition of run= was here
/Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/compat.rb:14: warning: shadowing outer local variable - line
/Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/compat.rb:41: warning: shadowing outer local variable - hash
== Sinatra/0.9.4 has taken the stage on 4567 for development with backup from WEBrick
[2009-12-29 16:04:11] INFO  WEBrick 1.3.1
[2009-12-29 16:04:11] INFO  ruby 1.9.2 (2009-12-29) [i386-darwin9.8.0]
[2009-12-29 16:04:11] INFO  WEBrick::HTTPServer#start: pid=8723 port=4567
ArgumentError - wrong number of arguments (1 for 0):
 /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
 /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
 /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'ArgumentError: wrong number of arguments (1 for 0)
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:474:in `instance_eval'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:474:in `route_eval'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:463:in `block (2 levels) in route!'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:460:in `catch'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:460:in `block in route!'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:439:in `each'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:439:in `route!'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:555:in `dispatch!'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:375:in `block in call!'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `instance_eval'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `block in invoke'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `catch'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `invoke'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/compat.rb:138:in `invoke'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:375:in `call!'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:364:in `call'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/showexceptions.rb:24:in `call'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in `call'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/commonlogger.rb:20:in `_call'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/commonlogger.rb:13:in `call'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `block in call'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:943:in `synchronize'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `call'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/content_length.rb:13:in `call'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/handler/webrick.rb:50:in `service'
        /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
        /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
        /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
127.0.0.1 - - [29/Dec/2009 16:04:23] &quot;GET / HTTP/1.1&quot; 500 82483 0.2460
localhost - - [29/Dec/2009:16:04:23 PST] &quot;GET / HTTP/1.1&quot; 500 82483
- -&amp;gt; /
ArgumentError - wrong number of arguments (1 for 0):
 /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
 /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
 /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'ArgumentError: wrong number of arguments (1 for 0)
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:474:in `instance_eval'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:474:in `route_eval'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:463:in `block (2 levels) in route!'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:460:in `catch'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:460:in `block in route!'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:439:in `each'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:439:in `route!'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:555:in `dispatch!'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:375:in `block in call!'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `instance_eval'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `block in invoke'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `catch'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `invoke'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/compat.rb:138:in `invoke'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:375:in `call!'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:364:in `call'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/showexceptions.rb:24:in `call'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in `call'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/commonlogger.rb:20:in `_call'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/commonlogger.rb:13:in `call'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `block in call'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:943:in `synchronize'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `call'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/content_length.rb:13:in `call'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/handler/webrick.rb:50:in `service'
        /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
        /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
        /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
127.0.0.1 - - [29/Dec/2009 16:04:24] &quot;GET /__sinatra__/500.png HTTP/1.1&quot; 500 82611 0.3827
localhost - - [29/Dec/2009:16:04:23 PST] &quot;GET /__sinatra__/500.png HTTP/1.1&quot; 500 82611
http://localhost:4567/ -&amp;gt; /__sinatra__/500.png
ArgumentError - wrong number of arguments (1 for 0):
 /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
 /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
 /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'ArgumentError: wrong number of arguments (1 for 0)
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:474:in `instance_eval'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:474:in `route_eval'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:463:in `block (2 levels) in route!'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:460:in `catch'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:460:in `block in route!'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:439:in `each'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:439:in `route!'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:555:in `dispatch!'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:375:in `block in call!'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `instance_eval'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `block in invoke'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `catch'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:522:in `invoke'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/compat.rb:138:in `invoke'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:375:in `call!'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:364:in `call'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/showexceptions.rb:24:in `call'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in `call'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/commonlogger.rb:20:in `_call'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/commonlogger.rb:13:in `call'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `block in call'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:943:in `synchronize'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `call'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/content_length.rb:13:in `call'
        /Users/ujihisa/rubies/lib/ruby/gems/1.9.1/gems/rack-1.0.1/lib/rack/handler/webrick.rb:50:in `service'
        /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
        /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
        /Users/ujihisa/rubies/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
127.0.0.1 - - [29/Dec/2009 16:04:24] &quot;GET /favicon.ico HTTP/1.1&quot; 500 82579 0.3136
localhost - - [29/Dec/2009:16:04:24 PST] &quot;GET /favicon.ico HTTP/1.1&quot; 500 82579
http://localhost:4567/ -&amp;gt; /favicon.ico
^C
== Sinatra has ended his set (crowd applauds)
[2009-12-29 16:04:29] INFO  going to shutdown ...
[2009-12-29 16:04:29] INFO  WEBrick::HTTPServer#start done.
/tmp/thins&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">11306</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2010-01-11T10:04:32-08:00</created-at>
    <creator-id type="integer">36235</creator-id>
    <milestone-due-on type="datetime">2010-02-08T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">41832</milestone-id>
    <number type="integer">318</number>
    <permalink>rackup-e-production-does-not-call-config-blocks</permalink>
    <priority type="integer">37</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>invalid</state>
    <tag nil="true"></tag>
    <title>rackup -E production does not call config blocks</title>
    <updated-at type="datetime">2010-01-14T10:21:06-08:00</updated-at>
    <user-id type="integer">17123</user-id>
    <user-name>Ryan Tomayko</user-name>
    <creator-name>TJ Holowaychuk</creator-name>
    <assigned-user-name>Simon Rozet</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/318</url>
    <milestone-title>1.0</milestone-title>
    <original-body>@@@ ruby
configure do
  p 'configure'
end

configure :production do
  p 'configure production'
end
@@@

with `$ rackup -E production` etc does not call the second block, maybe I misunderstood how
this is supposed to be used</original-body>
    <latest-body>@@@ ruby
configure do
  p 'configure'
end

configure :production do
  p 'configure production'
end
@@@

with `$ rackup -E production` etc does not call the second block, maybe I misunderstood how
this is supposed to be used</latest-body>
    <original-body-html>&lt;div&gt;&lt;pre&gt;
&lt;code class=&quot;ruby&quot;&gt;configure do
  p 'configure'
end

configure :production do
  p 'configure production'
end&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;with &lt;code&gt;$ rackup -E production&lt;/code&gt; etc does not call the
second block, maybe I misunderstood how&lt;br&gt;
this is supposed to be used&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">17123</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-12-27T08:40:33-08:00</created-at>
    <creator-id type="integer">12893</creator-id>
    <milestone-due-on type="datetime">2010-02-08T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">41832</milestone-id>
    <number type="integer">315</number>
    <permalink>before-filters</permalink>
    <priority type="integer">4</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>wontfix</state>
    <tag>filters</tag>
    <title>Before Filters</title>
    <updated-at type="datetime">2009-12-28T12:12:27-08:00</updated-at>
    <user-id type="integer">12893</user-id>
    <user-name>DAddYE</user-name>
    <creator-name>DAddYE</creator-name>
    <assigned-user-name>Ryan Tomayko</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/315</url>
    <milestone-title>1.0</milestone-title>
    <original-body>Hi,

It's possible in next release eval filters in route_eval or some where so we can get the route params?

Take this example

@@@ ruby
before do
  I18n.locale = params[:locale] if params[:locale]
end

get &quot;/:locale/posts&quot; do; end
get &quot;/:locale/posts/:id&quot; do; end
put &quot;/:locale/posts/:id&quot; do; end
...
@@@

Now is not possible do that (with this simple way) or Im wrong?

Why do some like this:

@@@ ruby
  def route_eval(&amp;block)
    before_filter!
    throw :halt, instance_eval(&amp;block)
    after_filter!
  end
@@@

Thanks!</original-body>
    <latest-body>Hi,

It's possible in next release eval filters in route_eval or some where so we can get the route params?

Take this example

@@@ ruby
before do
  I18n.locale = params[:locale] if params[:locale]
end

get &quot;/:locale/posts&quot; do; end
get &quot;/:locale/posts/:id&quot; do; end
put &quot;/:locale/posts/:id&quot; do; end
...
@@@

Now is not possible do that (with this simple way) or Im wrong?

Why do some like this:

@@@ ruby
  def route_eval(&amp;block)
    before_filter!
    throw :halt, instance_eval(&amp;block)
    after_filter!
  end
@@@

Thanks!</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It's possible in next release eval filters in route_eval or some
where so we can get the route params?&lt;/p&gt;
&lt;p&gt;Take this example&lt;/p&gt;
&lt;pre&gt;
&lt;code class=&quot;ruby&quot;&gt;before do
  I18n.locale = params[:locale] if params[:locale]
end

get &quot;/:locale/posts&quot; do; end
get &quot;/:locale/posts/:id&quot; do; end
put &quot;/:locale/posts/:id&quot; do; end
...&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Now is not possible do that (with this simple way) or Im
wrong?&lt;/p&gt;
&lt;p&gt;Why do some like this:&lt;/p&gt;
&lt;pre&gt;
&lt;code class=&quot;ruby&quot;&gt;  def route_eval(&amp;amp;block)
    before_filter!
    throw :halt, instance_eval(&amp;amp;block)
    after_filter!
  end&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">11306</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-12-22T23:07:41-08:00</created-at>
    <creator-id type="integer">42236</creator-id>
    <milestone-due-on type="datetime">2010-02-08T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">41832</milestone-id>
    <number type="integer">314</number>
    <permalink>racksession-variable-is-missing-env-under-test-environment</permalink>
    <priority type="integer">35</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag nil="true"></tag>
    <title>rack.session variable is missing env under test environment</title>
    <updated-at type="datetime">2009-12-25T19:14:18-08:00</updated-at>
    <user-id type="integer">11306</user-id>
    <user-name>Simon Rozet</user-name>
    <creator-name>sankar</creator-name>
    <assigned-user-name>Simon Rozet</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/314</url>
    <milestone-title>1.0</milestone-title>
    <original-body>hi
 i just try to set session in rack middleware under development and production the code works fine. but in test mode the env['rack.session'] is missing.

below is sample code
hello_rack.rb
class HelloRack  
  def initialize(app)
    @app = app
  end
  def call(env)  
      session = env['rack.session']
      puts env.inspect
      unless session[:user]
           session[:user] = &quot;matz&quot;
      end 
      status,headers,response = @app.call(env)
      [status,headers, response]
  end
end

hello_world.rb
require 'rubygems'
require 'sinatra'
require File.dirname(__FILE__)+'/hello_rack'
use HelloRack
enable :sessions

get '/' do
  user = session[:user] || &quot;sankar&quot;
  &quot;Hello World! #{user}&quot;
end

sinatra_test.rb
require File.dirname(__FILE__)+'/hello_world'  # &lt;-- your sinatra app
require 'test/spec'
require 'rack/test'

set :environment, :test

describe 'The HelloWorld App' do
  include Rack::Test::Methods

  def app
    Sinatra::Application
  end

  it &quot;says hello&quot; do
    get '/'
    last_response.should.be.ok
    last_response.body.should.equal 'Hello World'
  end
end


i got the following error

{&quot;rack.test&quot;=&gt;true, &quot;SERVER_NAME&quot;=&gt;&quot;example.org&quot;, &quot;CONTENT_LENGTH&quot;=&gt;&quot;0&quot;, &quot;rack.url_scheme&quot;=&gt;&quot;http&quot;, &quot;rack.errors&quot;=&gt;#&lt;StringIO:0xb7a328cc&gt;, &quot;REMOTE_ADDR&quot;=&gt;&quot;127.0.0.1&quot;, &quot;PATH_INFO&quot;=&gt;&quot;/&quot;, &quot;rack.version&quot;=&gt;[0, 1], &quot;rack.run_once&quot;=&gt;false, &quot;rack.request&quot;=&gt;#&lt;Rack::Request:0xb7a325e8 @env={...}&gt;, &quot;SCRIPT_NAME&quot;=&gt;&quot;&quot;, &quot;HTTP_COOKIE&quot;=&gt;&quot;&quot;, &quot;rack.multithread&quot;=&gt;true, &quot;rack.multiprocess&quot;=&gt;true, &quot;SERVER_PORT&quot;=&gt;&quot;80&quot;, &quot;REQUEST_METHOD&quot;=&gt;&quot;GET&quot;, &quot;QUERY_STRING&quot;=&gt;&quot;&quot;, &quot;rack.input&quot;=&gt;#&lt;StringIO:0xb7a3287c&gt;}
E
Finished in 0.06553 seconds.

  1) Error:
test_spec {The HelloWorld App} 001 [says hello](The HelloWorld App):
NoMethodError: undefined method `[]' for nil:NilClass
    ./hello_rack.rb:10:in `call'
    /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb:24:in `call'
    /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.2/lib/sinatra/base.rb:898:in `call'
    /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.2/lib/sinatra/base.rb:943:in `synchronize'
    /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.2/lib/sinatra/base.rb:898:in `call'
    /home/abs1/.gem/ruby/1.8/gems/rack-test-0.5.0/lib/rack/mock_session.rb:30:in `request'
    /home/abs1/.gem/ruby/1.8/gems/rack-test-0.5.0/lib/rack/test.rb:207:in `process_request'
    /home/abs1/.gem/ruby/1.8/gems/rack-test-0.5.0/lib/rack/test.rb:57:in `get'
    sinatra_test.rb:15:in `test_spec {The HelloWorld App} 001 [says hello]'

1 tests, 0 assertions, 0 failures, 1 errors

shell returned 1</original-body>
    <latest-body>hi
 i just try to set session in rack middleware under development and production the code works fine. but in test mode the env['rack.session'] is missing.

below is sample code
hello_rack.rb
class HelloRack  
  def initialize(app)
    @app = app
  end
  def call(env)  
      session = env['rack.session']
      puts env.inspect
      unless session[:user]
           session[:user] = &quot;matz&quot;
      end 
      status,headers,response = @app.call(env)
      [status,headers, response]
  end
end

hello_world.rb
require 'rubygems'
require 'sinatra'
require File.dirname(__FILE__)+'/hello_rack'
use HelloRack
enable :sessions

get '/' do
  user = session[:user] || &quot;sankar&quot;
  &quot;Hello World! #{user}&quot;
end

sinatra_test.rb
require File.dirname(__FILE__)+'/hello_world'  # &lt;-- your sinatra app
require 'test/spec'
require 'rack/test'

set :environment, :test

describe 'The HelloWorld App' do
  include Rack::Test::Methods

  def app
    Sinatra::Application
  end

  it &quot;says hello&quot; do
    get '/'
    last_response.should.be.ok
    last_response.body.should.equal 'Hello World'
  end
end


i got the following error

{&quot;rack.test&quot;=&gt;true, &quot;SERVER_NAME&quot;=&gt;&quot;example.org&quot;, &quot;CONTENT_LENGTH&quot;=&gt;&quot;0&quot;, &quot;rack.url_scheme&quot;=&gt;&quot;http&quot;, &quot;rack.errors&quot;=&gt;#&lt;StringIO:0xb7a328cc&gt;, &quot;REMOTE_ADDR&quot;=&gt;&quot;127.0.0.1&quot;, &quot;PATH_INFO&quot;=&gt;&quot;/&quot;, &quot;rack.version&quot;=&gt;[0, 1], &quot;rack.run_once&quot;=&gt;false, &quot;rack.request&quot;=&gt;#&lt;Rack::Request:0xb7a325e8 @env={...}&gt;, &quot;SCRIPT_NAME&quot;=&gt;&quot;&quot;, &quot;HTTP_COOKIE&quot;=&gt;&quot;&quot;, &quot;rack.multithread&quot;=&gt;true, &quot;rack.multiprocess&quot;=&gt;true, &quot;SERVER_PORT&quot;=&gt;&quot;80&quot;, &quot;REQUEST_METHOD&quot;=&gt;&quot;GET&quot;, &quot;QUERY_STRING&quot;=&gt;&quot;&quot;, &quot;rack.input&quot;=&gt;#&lt;StringIO:0xb7a3287c&gt;}
E
Finished in 0.06553 seconds.

  1) Error:
test_spec {The HelloWorld App} 001 [says hello](The HelloWorld App):
NoMethodError: undefined method `[]' for nil:NilClass
    ./hello_rack.rb:10:in `call'
    /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb:24:in `call'
    /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.2/lib/sinatra/base.rb:898:in `call'
    /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.2/lib/sinatra/base.rb:943:in `synchronize'
    /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.2/lib/sinatra/base.rb:898:in `call'
    /home/abs1/.gem/ruby/1.8/gems/rack-test-0.5.0/lib/rack/mock_session.rb:30:in `request'
    /home/abs1/.gem/ruby/1.8/gems/rack-test-0.5.0/lib/rack/test.rb:207:in `process_request'
    /home/abs1/.gem/ruby/1.8/gems/rack-test-0.5.0/lib/rack/test.rb:57:in `get'
    sinatra_test.rb:15:in `test_spec {The HelloWorld App} 001 [says hello]'

1 tests, 0 assertions, 0 failures, 1 errors

shell returned 1</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;hi&lt;br&gt;
i just try to set session in rack middleware under development and
production the code works fine. but in test mode the
env['rack.session'] is missing.&lt;/p&gt;
&lt;p&gt;below is sample code&lt;br&gt;
hello_rack.rb&lt;br&gt;
class HelloRack&lt;br&gt;
def initialize(app)&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;@app = app&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;end def call(env)&lt;br&gt;&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;  session = env['rack.session']
  puts env.inspect
  unless session[:user]
       session[:user] = &quot;matz&quot;
  end 
  status,headers,response = @app.call(env)
  [status,headers, response]&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;end end&lt;/p&gt;
&lt;p&gt;hello_world.rb&lt;br&gt;
require 'rubygems'&lt;br&gt;
require 'sinatra'&lt;br&gt;
require File.dirname(&lt;strong&gt;FILE&lt;/strong&gt;)+'/hello_rack'&lt;br&gt;
use HelloRack&lt;br&gt;
enable :sessions&lt;/p&gt;
&lt;p&gt;get '/' do&lt;br&gt;
user = session[:user] || &quot;sankar&quot; &quot;Hello World! #{user}&quot; end&lt;/p&gt;
&lt;p&gt;sinatra_test.rb&lt;br&gt;
require File.dirname(&lt;strong&gt;FILE&lt;/strong&gt;)+'/hello_world' # &amp;lt;--
your sinatra app&lt;br&gt;
require 'test/spec'&lt;br&gt;
require 'rack/test'&lt;/p&gt;
&lt;p&gt;set :environment, :test&lt;/p&gt;
&lt;p&gt;describe 'The HelloWorld App' do&lt;br&gt;
include Rack::Test::Methods&lt;/p&gt;
&lt;p&gt;def app&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;Sinatra::Application&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;end&lt;/p&gt;
&lt;p&gt;it &quot;says hello&quot; do&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;get '/'
last_response.should.be.ok
last_response.body.should.equal 'Hello World'&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;end end&lt;/p&gt;
&lt;p&gt;i got the following error&lt;/p&gt;
&lt;p&gt;{&quot;rack.test&quot;=&amp;gt;true, &quot;SERVER_NAME&quot;=&amp;gt;&quot;example.org&quot;,
&quot;CONTENT_LENGTH&quot;=&amp;gt;&quot;0&quot;, &quot;rack.url_scheme&quot;=&amp;gt;&quot;http&quot;,
&quot;rack.errors&quot;=&amp;gt;#&amp;lt;StringIO:0xb7a328cc&amp;gt;,
&quot;REMOTE_ADDR&quot;=&amp;gt;&quot;127.0.0.1&quot;, &quot;PATH_INFO&quot;=&amp;gt;&quot;/&quot;,
&quot;rack.version&quot;=&amp;gt;[0, 1], &quot;rack.run_once&quot;=&amp;gt;false,
&quot;rack.request&quot;=&amp;gt;#&amp;lt;Rack::Request:0xb7a325e8 @env={...}&amp;gt;,
&quot;SCRIPT_NAME&quot;=&amp;gt;&quot;&quot;, &quot;HTTP_COOKIE&quot;=&amp;gt;&quot;&quot;,
&quot;rack.multithread&quot;=&amp;gt;true, &quot;rack.multiprocess&quot;=&amp;gt;true,
&quot;SERVER_PORT&quot;=&amp;gt;&quot;80&quot;, &quot;REQUEST_METHOD&quot;=&amp;gt;&quot;GET&quot;,
&quot;QUERY_STRING&quot;=&amp;gt;&quot;&quot;,
&quot;rack.input&quot;=&amp;gt;#&amp;lt;StringIO:0xb7a3287c&amp;gt;} E&lt;br&gt;
Finished in 0.06553 seconds.&lt;/p&gt;
&lt;p&gt;1) Error: test_spec {The HelloWorld App} 001 [says hello](The
HelloWorld App):&lt;br&gt;
NoMethodError: undefined method &lt;code&gt;[]' for
nil:NilClass&amp;lt;br/&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;./hello_rack.rb:10:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb:24:in `call'
/usr/lib/ruby/gems/1.8/gems/sinatra-0.9.2/lib/sinatra/base.rb:898:in `call'
/usr/lib/ruby/gems/1.8/gems/sinatra-0.9.2/lib/sinatra/base.rb:943:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/sinatra-0.9.2/lib/sinatra/base.rb:898:in `call'
/home/abs1/.gem/ruby/1.8/gems/rack-test-0.5.0/lib/rack/mock_session.rb:30:in `request'
/home/abs1/.gem/ruby/1.8/gems/rack-test-0.5.0/lib/rack/test.rb:207:in `process_request'
/home/abs1/.gem/ruby/1.8/gems/rack-test-0.5.0/lib/rack/test.rb:57:in `get'
sinatra_test.rb:15:in `test_spec {The HelloWorld App} 001 [says hello]'&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;1 tests, 0 assertions, 0 failures, 1 errors&lt;/p&gt;
&lt;p&gt;shell returned 1&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">17123</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-12-22T19:45:54-08:00</created-at>
    <creator-id type="integer">11306</creator-id>
    <milestone-due-on type="datetime">2010-02-08T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">41832</milestone-id>
    <number type="integer">313</number>
    <permalink>misc-readme-fix-and-additions</permalink>
    <priority type="integer">42</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag nil="true"></tag>
    <title>Misc README fix and additions</title>
    <updated-at type="datetime">2009-12-25T19:10:38-08:00</updated-at>
    <user-id type="integer">11306</user-id>
    <user-name>Simon Rozet</user-name>
    <creator-name>Simon Rozet</creator-name>
    <assigned-user-name>Ryan Tomayko</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/313</url>
    <milestone-title>1.0</milestone-title>
    <original-body>Please review http://github.com/sr/sinatra/tree/readme I'll squash before pushing. Thanks</original-body>
    <latest-body>Please review http://github.com/sr/sinatra/tree/readme I'll squash before pushing. Thanks</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;Please review &lt;a href=
&quot;http://github.com/sr/sinatra/tree/readme&quot;&gt;http://github.com/sr/sinatra/tree/readme&lt;/a&gt;
I'll squash before pushing. Thanks&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">11306</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-12-11T14:40:42-08:00</created-at>
    <creator-id type="integer">17123</creator-id>
    <milestone-due-on type="datetime">2010-02-08T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">41832</milestone-id>
    <number type="integer">308</number>
    <permalink>deprecate-use_in_file_templates-choose-better-name</permalink>
    <priority type="integer">1</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag nil="true"></tag>
    <title>Deprecate &quot;use_in_file_templates!&quot;, choose better name</title>
    <updated-at type="datetime">2009-12-22T19:43:28-08:00</updated-at>
    <user-id type="integer">11306</user-id>
    <user-name>Simon Rozet</user-name>
    <creator-name>Ryan Tomayko</creator-name>
    <assigned-user-name>Simon Rozet</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/308</url>
    <milestone-title>1.0</milestone-title>
    <original-body>We've wanted to change this method name for a long time. Need to do it now if we're going to do it. Here's some ideas:

  * `import_templates`
  * `load_file_templates`
  * Umm. I can't think of anything, really.

Note that this method doesn't even need to be called anymore for top-level apps - it happens automatically in `sinatra/main.rb`.</original-body>
    <latest-body>We've wanted to change this method name for a long time. Need to do it now if we're going to do it. Here's some ideas:

  * `import_templates`
  * `load_file_templates`
  * Umm. I can't think of anything, really.

Note that this method doesn't even need to be called anymore for top-level apps - it happens automatically in `sinatra/main.rb`.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;We've wanted to change this method name for a long time. Need to
do it now if we're going to do it. Here's some ideas:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;import_templates&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;load_file_templates&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Umm. I can't think of anything, really.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note that this method doesn't even need to be called anymore for
top-level apps - it happens automatically in
&lt;code&gt;sinatra/main.rb&lt;/code&gt;.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">17123</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-09-04T01:46:01-07:00</created-at>
    <creator-id type="integer">68723</creator-id>
    <milestone-due-on type="datetime">2010-02-08T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">41832</milestone-id>
    <number type="integer">280</number>
    <permalink>please-create-a-command-line-option-i-which-makes-sinatra-bind-to-a-specific-ip</permalink>
    <priority type="integer">22</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag>options</tag>
    <title>Please create a command line option (-i) which makes sinatra bind to a specific IP</title>
    <updated-at type="datetime">2009-12-13T12:36:34-08:00</updated-at>
    <user-id type="integer">17123</user-id>
    <user-name>Ryan Tomayko</user-name>
    <creator-name>lastcoolnameleft</creator-name>
    <assigned-user-name>Ryan Tomayko</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/280</url>
    <milestone-title>1.0</milestone-title>
    <original-body>A few days ago I completed my first sinatra app, it was fun and really easy. 

While installing it on our server, the admin told me to run it on 127.0.0.1 rather that 0.0.0.0. It turned out that there is no command line switch for it, so I had to edit the default IP in sinatra-0.9.4/lib/sinatra/base.rb al a workaround.


Please add a command line option for that purpose.

   Peter</original-body>
    <latest-body>A few days ago I completed my first sinatra app, it was fun and really easy. 

While installing it on our server, the admin told me to run it on 127.0.0.1 rather that 0.0.0.0. It turned out that there is no command line switch for it, so I had to edit the default IP in sinatra-0.9.4/lib/sinatra/base.rb al a workaround.


Please add a command line option for that purpose.

   Peter</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;A few days ago I completed my first sinatra app, it was fun and
really easy.&lt;/p&gt;
&lt;p&gt;While installing it on our server, the admin told me to run it
on 127.0.0.1 rather that 0.0.0.0. It turned out that there is no
command line switch for it, so I had to edit the default IP in
sinatra-0.9.4/lib/sinatra/base.rb al a workaround.&lt;/p&gt;
&lt;p&gt;Please add a command line option for that purpose.&lt;/p&gt;
&lt;p&gt;Peter&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">17123</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-12-11T14:47:51-08:00</created-at>
    <creator-id type="integer">17123</creator-id>
    <milestone-due-on type="datetime">2010-02-08T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">41832</milestone-id>
    <number type="integer">309</number>
    <permalink>extensions-cant-add-routes</permalink>
    <priority type="integer">40</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag nil="true"></tag>
    <title>Extensions can't add routes</title>
    <updated-at type="datetime">2009-12-13T11:43:12-08:00</updated-at>
    <user-id type="integer">17123</user-id>
    <user-name>Ryan Tomayko</user-name>
    <creator-name>Ryan Tomayko</creator-name>
    <assigned-user-name>Ryan Tomayko</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/309</url>
    <milestone-title>1.0</milestone-title>
    <original-body>I vaguely remember a problem with extensions trying to add routes and things failing when people subclassed either `Sinatra::Default`, `Sinatra::Base`, or both. I can't remember the details but I'd like to know what's going on there and whether its been fixed before 1.0.</original-body>
    <latest-body>I vaguely remember a problem with extensions trying to add routes and things failing when people subclassed either `Sinatra::Default`, `Sinatra::Base`, or both. I can't remember the details but I'd like to know what's going on there and whether its been fixed before 1.0.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;I vaguely remember a problem with extensions trying to add
routes and things failing when people subclassed either
&lt;code&gt;Sinatra::Default&lt;/code&gt;, &lt;code&gt;Sinatra::Base&lt;/code&gt;, or both.
I can't remember the details but I'd like to know what's going on
there and whether its been fixed before 1.0.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">11306</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-12-12T17:07:04-08:00</created-at>
    <creator-id type="integer">74434</creator-id>
    <milestone-due-on type="datetime">2010-02-08T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">41832</milestone-id>
    <number type="integer">305</number>
    <permalink>html_escape-gets-set-to-true-when-you-add-a-haml-option-from-the-route-block</permalink>
    <priority type="integer">34</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>worksforme</state>
    <tag>haml haml_options</tag>
    <title>:html_escape gets set to true when you add a haml option from the route block</title>
    <updated-at type="datetime">2009-12-13T10:29:05-08:00</updated-at>
    <user-id type="integer">11306</user-id>
    <user-name>Simon Rozet</user-name>
    <creator-name>picardo</creator-name>
    <assigned-user-name>Simon Rozet</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/305</url>
    <milestone-title>1.0</milestone-title>
    <original-body>Hey guys,

I am seeing a weird issue. :haml_options is getting set to true whenever I specify an option from the route block.

So with this route...

  get &quot;/&quot; do
    haml :home, :layout =&gt; :'layouts/application'
    
  end

haml escapes all HTML...This is what you see in your browser:

  &lt;h2&gt;Hello world&lt;/h2&gt;

It doesn't matter in the init.rb I have this:

  set :haml, { :format =&gt; :html5, :escape_html=&gt;false }

If i remove the :layout =&gt; :'layouts/application', then it looks ok. If I add :escape_html=&gt;false after :layout, then it looks ok as well. But I think this should not be reset everytime I use a haml option, right?</original-body>
    <latest-body>Hey guys,

I am seeing a weird issue. :haml_options is getting set to true whenever I specify an option from the route block.

So with this route...

  get &quot;/&quot; do
    haml :home, :layout =&gt; :'layouts/application'
    
  end

haml escapes all HTML...This is what you see in your browser:

  &lt;h2&gt;Hello world&lt;/h2&gt;

It doesn't matter in the init.rb I have this:

  set :haml, { :format =&gt; :html5, :escape_html=&gt;false }

If i remove the :layout =&gt; :'layouts/application', then it looks ok. If I add :escape_html=&gt;false after :layout, then it looks ok as well. But I think this should not be reset everytime I use a haml option, right?</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;Hey guys,&lt;/p&gt;
&lt;p&gt;I am seeing a weird issue. :haml_options is getting set to true
whenever I specify an option from the route block.&lt;/p&gt;
&lt;p&gt;So with this route...&lt;/p&gt;
&lt;p&gt;get &quot;/&quot; do&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;haml :home, :layout =&amp;gt; :'layouts/application'&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;end&lt;/p&gt;
&lt;p&gt;haml escapes all HTML...This is what you see in your
browser:&lt;/p&gt;
&lt;h2&gt;Hello world&lt;/h2&gt;
&lt;p&gt;It doesn't matter in the init.rb I have this:&lt;/p&gt;
&lt;p&gt;set :haml, { :format =&amp;gt; :html5, :escape_html=&amp;gt;false }&lt;/p&gt;
&lt;p&gt;If i remove the :layout =&amp;gt; :'layouts/application', then it
looks ok. If I add :escape_html=&amp;gt;false after :layout, then it
looks ok as well. But I think this should not be reset everytime I
use a haml option, right?&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">15214</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2008-04-30T11:15:18-07:00</created-at>
    <creator-id type="integer">7654</creator-id>
    <milestone-due-on type="datetime">2012-12-31T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">27724</milestone-id>
    <number type="integer">16</number>
    <permalink>patch-http-authentication</permalink>
    <priority type="integer">26</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag>auth http patch</tag>
    <title>Offical HTTP Authentication Extensions</title>
    <updated-at type="datetime">2009-12-12T16:30:14-08:00</updated-at>
    <user-id type="integer">17123</user-id>
    <user-name>Ryan Tomayko</user-name>
    <creator-name>Bj&#248;rn Arild M&#230;land</creator-name>
    <assigned-user-name>Blake Mizerany</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/16</url>
    <milestone-title>Future</milestone-title>
    <original-body>I needed HTTP auth for a simple web service I was creating, so I ported some code over from Rails. I guess this could be useful for others as well? :)

Code: http://github.com/Chrononaut/sinatra/commits/master</original-body>
    <latest-body>I needed HTTP auth for a simple web service I was creating, so I ported some code over from Rails. I guess this could be useful for others as well? :)

Code: http://github.com/Chrononaut/sinatra/commits/master</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;
I needed HTTP auth for a simple web service I was creating, so I ported some code over from Rails. I guess this could be useful for others as well? :)
&lt;/p&gt;&lt;p&gt;
Code: &lt;a href=&quot;http://github.com/Chrononaut/sinatra/commits/master&quot;&gt;http://github.com/Chrononaut/sin...&lt;/a&gt;
&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">17123</assigned-user-id>
    <attachments-count type="integer">2</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-01-30T04:02:02-08:00</created-at>
    <creator-id type="integer">278</creator-id>
    <milestone-due-on type="datetime">2010-02-08T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">41832</milestone-id>
    <number type="integer">142</number>
    <permalink>gravatar-for-githubcomsinatra</permalink>
    <priority type="integer">5</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag nil="true"></tag>
    <title>gravatar for github.com/sinatra</title>
    <updated-at type="datetime">2009-12-12T15:32:25-08:00</updated-at>
    <user-id type="integer">17123</user-id>
    <user-name>Ryan Tomayko</user-name>
    <creator-name>ronin-278 (at lighthouseapp)</creator-name>
    <assigned-user-name>Ryan Tomayko</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/142</url>
    <milestone-title>1.0</milestone-title>
    <original-body>Can we register a gravatar with the hat for the email used for github.com/sinatra? kthxbai</original-body>
    <latest-body>Can we register a gravatar with the hat for the email used for github.com/sinatra? kthxbai</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;Can we register a gravatar with the hat for the email used for
github.com/sinatra? kthxbai&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">11306</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-05-12T05:25:22-07:00</created-at>
    <creator-id type="integer">47921</creator-id>
    <milestone-due-on type="datetime">2010-02-08T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">41832</milestone-id>
    <number type="integer">224</number>
    <permalink>github-djanowski-sent-you-a-message</permalink>
    <priority type="integer">1</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag nil="true"></tag>
    <title>Don't disable sessions in test environment</title>
    <updated-at type="datetime">2009-12-12T15:31:55-08:00</updated-at>
    <user-id type="integer">17123</user-id>
    <user-name>Ryan Tomayko</user-name>
    <creator-name>GitHub</creator-name>
    <assigned-user-name>Simon Rozet</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/224</url>
    <milestone-title>1.0</milestone-title>
    <original-body>djanowski wants you to pull from djanowski/sinatra at enable_sessions_if_i_really_want_to

Body: Please disregard the pull request from master.

View repository: http://github.com/djanowski/sinatra/tree/enable_sessions_if_i_really_want_to</original-body>
    <latest-body>djanowski wants you to pull from djanowski/sinatra at enable_sessions_if_i_really_want_to

Body: Please disregard the pull request from master.

View repository: http://github.com/djanowski/sinatra/tree/enable_sessions_if_i_really_want_to</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;djanowski wants you to pull from djanowski/sinatra at
enable_sessions_if_i_really_want_to&lt;/p&gt;
&lt;p&gt;Body: Please disregard the pull request from master.&lt;/p&gt;
&lt;p&gt;View repository: &lt;a href=&quot;http://github.com/djanowski/sinatra/tree/enable_sessions_if_i_really_want_to&quot;&gt;
http://github.com/djanowski/sina...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">17123</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-01-09T02:34:40-08:00</created-at>
    <creator-id type="integer">17123</creator-id>
    <milestone-due-on type="datetime">2010-02-08T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">41832</milestone-id>
    <number type="integer">62</number>
    <permalink>cachedcompiled-templates</permalink>
    <priority type="integer">6</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag>performance templates</tag>
    <title>Cached/Compiled Templates</title>
    <updated-at type="datetime">2009-12-12T15:29:36-08:00</updated-at>
    <user-id type="integer">17123</user-id>
    <user-name>Ryan Tomayko</user-name>
    <creator-name>Ryan Tomayko</creator-name>
    <assigned-user-name>Ryan Tomayko</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/62</url>
    <milestone-title>1.0</milestone-title>
    <original-body>Pratik (lifo) was working on support for compiled templates at one point and was far enough along to show a significant perf win. IIRC, the big issues he ran into were 1.) dealing with locals, and 2.) recompiling when a template changes on disk.</original-body>
    <latest-body>Pratik (lifo) was working on support for compiled templates at one point and was far enough along to show a significant perf win. IIRC, the big issues he ran into were 1.) dealing with locals, and 2.) recompiling when a template changes on disk.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;Pratik (lifo) was working on support for compiled templates at
one point and was far enough along to show a significant perf win.
IIRC, the big issues he ran into were 1.) dealing with locals, and
2.) recompiling when a template changes on disk.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">17123</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-07-01T16:55:03-07:00</created-at>
    <creator-id type="integer">6253</creator-id>
    <milestone-due-on type="datetime">2010-02-08T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">41832</milestone-id>
    <number type="integer">256</number>
    <permalink>some-percent-encoded-uri-route-matches-fail</permalink>
    <priority type="integer">12</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>wontfix</state>
    <tag nil="true"></tag>
    <title>some percent-encoded uri route matches fail</title>
    <updated-at type="datetime">2009-12-12T15:19:53-08:00</updated-at>
    <user-id type="integer">17123</user-id>
    <user-name>Ryan Tomayko</user-name>
    <creator-name>Darrin Eden</creator-name>
    <assigned-user-name>Ryan Tomayko</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/256</url>
    <milestone-title>1.0</milestone-title>
    <original-body>it seems that certain routes containing percent-encoded uri fail to match.

here's a failing test:
    uri_encode_test.rb
    http://gist.github.com/139160

thanks!</original-body>
    <latest-body>it seems that certain routes containing percent-encoded uri fail to match.

here's a failing test:
    uri_encode_test.rb
    http://gist.github.com/139160

thanks!</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;it seems that certain routes containing percent-encoded uri fail
to match.&lt;/p&gt;
&lt;p&gt;here's a failing test:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;uri_encode_test.rb
&lt;a href=&quot;http://gist.github.com/139160&quot;&gt;http://gist.github.com/139160&lt;/a&gt;
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;thanks!&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">17123</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-11-11T14:58:37-08:00</created-at>
    <creator-id type="integer">36235</creator-id>
    <milestone-due-on type="datetime">2010-02-08T00:00:00-08:00</milestone-due-on>
    <milestone-id type="integer">41832</milestone-id>
    <number type="integer">302</number>
    <permalink>session-testing-documentation-helpers-if-needed</permalink>
    <priority type="integer">37</priority>
    <project-id type="integer">9779</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag>documentation sessions</tag>
    <title>Session testing documentation / helpers if needed</title>
    <updated-at type="datetime">2009-12-12T10:42:20-08:00</updated-at>
    <user-id type="integer">36235</user-id>
    <user-name>TJ Holowaychuk</user-name>
    <creator-name>TJ Holowaychuk</creator-name>
    <assigned-user-name>Ryan Tomayko</assigned-user-name>
    <url>http://sinatra.lighthouseapp.com/projects/9779/tickets/302</url>
    <milestone-title>1.0</milestone-title>
    <original-body>I found a few other issues on here talking about session testing but nothing seems to be working. 

@@@ ruby 
    it &quot;should allow testing of sessions&quot; do
      mock_app do
        get '/foo' do
          session[:foo] = 'bar'
          'test'
        end
        
        get '/bar' do
          session[:foo]
        end
      end
      get '/foo'
      get '/bar'
      last_response.body.should == 'bar'
    end
@@@

my #mock_app helper:

@@@ ruby
    def mock_app options = {}, &amp;block
      subclass = Class.new Sinatra::Application
      subclass.enable :sessions
      subclass.set :environment, :not_test
      subclass.instance_eval &amp;block
      @app = subclass.new
    end
@@@

any advice would be great, id gladly write up some docs for the site for others to use</original-body>
    <latest-body>I found a few other issues on here talking about session testing but nothing seems to be working. 

@@@ ruby 
    it &quot;should allow testing of sessions&quot; do
      mock_app do
        get '/foo' do
          session[:foo] = 'bar'
          'test'
        end
        
        get '/bar' do
          session[:foo]
        end
      end
      get '/foo'
      get '/bar'
      last_response.body.should == 'bar'
    end
@@@

my #mock_app helper:

@@@ ruby
    def mock_app options = {}, &amp;block
      subclass = Class.new Sinatra::Application
      subclass.enable :sessions
      subclass.set :environment, :not_test
      subclass.instance_eval &amp;block
      @app = subclass.new
    end
@@@

any advice would be great, id gladly write up some docs for the site for others to use</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;I found a few other issues on here talking about session testing
but nothing seems to be working.&lt;/p&gt;
&lt;pre&gt;
&lt;code class=&quot;ruby&quot;&gt;    it &quot;should allow testing of sessions&quot; do
      mock_app do
        get '/foo' do
          session[:foo] = 'bar'
          'test'
        end
        
        get '/bar' do
          session[:foo]
        end
      end
      get '/foo'
      get '/bar'
      last_response.body.should == 'bar'
    end&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;my #mock_app helper:&lt;/p&gt;
&lt;pre&gt;
&lt;code class=&quot;ruby&quot;&gt;    def mock_app options = {}, &amp;amp;block
      subclass = Class.new Sinatra::Application
      subclass.enable :sessions
      subclass.set :environment, :not_test
      subclass.instance_eval &amp;amp;block
      @app = subclass.new
    end&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;any advice would be great, id gladly write up some docs for the
site for others to use&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
</tickets>
