public
Fork of bmizerany/sinatra
Description: Classy web-development dressed in a DSL
Homepage: http://sinatrarb.com
Clone URL: git://github.com/JackDanger/sinatra.git
bringing back the string.

Symbols are not garbage collected and I don't want to use the large (but 
cool) HashWithIndifferentAccess.  I could use OpenStruct ala camping but 
that seems unnecessary.

Long live the string.
Blake Mizerany (author)
Mon Mar 31 18:48:06 -0700 2008
commit  be5f5270ec642be3e17e7b739dc4c3e06464fff4
tree    33a1259cb751fa0eeb1f9f1f7b610010611bda9a
parent  1bcd28fa1340283ae8a4c884a40831b87281f362
...
149
150
151
152
 
153
154
155
...
586
587
588
589
 
590
591
 
592
593
594
...
149
150
151
 
152
153
154
155
...
586
587
588
 
589
590
 
591
592
593
594
0
@@ -149,7 +149,7 @@ module Sinatra
0
       @param_keys = []
0
       @options = options
0
       regex = @path.to_s.gsub(PARAM) do
0
- @param_keys << $1.intern
0
+ @param_keys << $1
0
         "(#{URI_CHAR}+)"
0
       end
0
       
0
@@ -586,9 +586,9 @@ module Sinatra
0
     end
0
     
0
     def params
0
- @params ||= @route_params.merge(@request.params).symbolize_keys
0
+ @params = @route_params.merge(@request.params)
0
     end
0
-
0
+
0
     def stop(*args)
0
       throw :halt, args
0
     end
...
18
19
20
21
 
22
23
24
...
18
19
20
 
21
22
23
24
0
@@ -18,7 +18,7 @@ context "Sinatra" do
0
   
0
   specify "handles events" do
0
     get '/:name' do
0
- 'Hello ' + params[:name]
0
+ 'Hello ' + params["name"]
0
     end
0
     
0
     get_it '/Blake'
...
42
43
44
45
 
46
47
48
...
120
121
122
123
 
124
125
126
...
42
43
44
 
45
46
47
48
...
120
121
122
 
123
124
125
126
0
@@ -42,7 +42,7 @@ context "Looking up a request" do
0
     
0
     result.should.not.be.nil
0
     result.block.should.be block
0
- result.params.should.equal :foo => 'bar'
0
+ result.params.should.equal "foo" => 'bar'
0
   end
0
               
0
 end
0
@@ -120,7 +120,7 @@ context "Events in an app" do
0
   
0
   specify "get access to request, response, and params" do
0
     get '/:foo' do
0
- params[:foo] + params[:bar]
0
+ params["foo"] + params["bar"]
0
     end
0
     
0
     get_it '/foo?bar=baz'
...
28
29
30
31
 
32
33
34
35
36
 
37
38
39
...
28
29
30
 
31
32
33
34
35
 
36
37
38
39
0
@@ -28,12 +28,12 @@ context "Simple Events" do
0
   specify "takes params in path" do
0
     result = invoke_simple('/:foo/:bar', '/a/b')
0
     result.should.not.be.nil
0
- result.params.should.equal :foo => 'a', :bar => 'b'
0
+ result.params.should.equal "foo" => 'a', "bar" => 'b'
0
     
0
     # unscapes
0
     result = invoke_simple('/:foo/:bar', '/a/blake%20mizerany')
0
     result.should.not.be.nil
0
- result.params.should.equal :foo => 'a', :bar => 'blake mizerany'
0
+ result.params.should.equal "foo" => 'a', "bar" => 'blake mizerany'
0
   end
0
   
0
   specify "ignores to many /'s" do

Comments

    No one has commented yet.