Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Remote backports dependency

Since the syntax depends on 1.9 mode, we can remove this dependency.
This saves us another 10 bytes from the source which is over 1% of the
entire almost Sinatra codebase.

I of course haven't tested this change, for that we have users to
verify that it works.
  • Loading branch information...
1 parent bf34e93 commit d68ca3b5e0f2ac4d5618e3c4fbac7c7be0483784 @dbussink dbussink committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  almost_sinatra.rb
2  almost_sinatra.rb
@@ -1,4 +1,4 @@
-%w.rack tilt backports INT{|l|trap(l){$r.stop}rescue require l}
+%w.rack tilt INT{|l|trap(l){$r.stop}rescue require l}
${extend Rack;a,D,S,$p,q,,Object.method(:define_method),/@@ *([^\n]+)\n(((?!@@)[^\n]*\n)*)/m,4567,a
%w[get post put delete].map{|m|D.(m){|u,&b|{run->(e){[200,{"Content-Type"=>"text/html"},[a.instance_eval(&b)]]}}}}{|k,v|D.(k){|n,*o|$t||=(h={};[0][/^[^:]+/]).scan(S){|a,b|h[a]=b};h);v[0].new(*o){n.to_s==n ?n:$t[n.to_s]}.render(a,o[0].try(:[],:locals)||{})}}

0 comments on commit d68ca3b

Please sign in to comment.
Something went wrong with that request. Please try again.