deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject git commit: Addresses JIRA DTACLOUD_248 - frozen string 1.8 vs 1.9 ruby
Date Wed, 04 Jul 2012 12:09:34 GMT
Updated Branches:
  refs/heads/master cc070f155 -> cf8af08f7


Addresses JIRA DTACLOUD_248 - frozen string 1.8 vs 1.9 ruby

Ruby 1.8 'gsub' on frozen string doesn't complain unless
the string is actually modified. In 1.9 things explode:
http://bugs.ruby-lang.org/issues/3200

https://issues.apache.org/jira/browse/DTACLOUD-248


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/cf8af08f
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/cf8af08f
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/cf8af08f

Branch: refs/heads/master
Commit: cf8af08f7b89f95b3dd89e97cac5f53383dab5d3
Parents: cc070f1
Author: marios <marios@redhat.com>
Authored: Wed Jul 4 15:00:05 2012 +0300
Committer: marios <marios@redhat.com>
Committed: Wed Jul 4 15:00:05 2012 +0300

----------------------------------------------------------------------
 server/lib/sinatra/rack_matrix_params.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/cf8af08f/server/lib/sinatra/rack_matrix_params.rb
----------------------------------------------------------------------
diff --git a/server/lib/sinatra/rack_matrix_params.rb b/server/lib/sinatra/rack_matrix_params.rb
index 0d9339b..e999f89 100644
--- a/server/lib/sinatra/rack_matrix_params.rb
+++ b/server/lib/sinatra/rack_matrix_params.rb
@@ -92,7 +92,7 @@ module Rack
       else
         # For other methods it's more complicated
         if env['REQUEST_METHOD']!='POST' and not matrix_params.keys.empty?
-          env['QUERY_STRING'].gsub!(/;([^\/]*)/, '')
+          env['QUERY_STRING'] = env['QUERY_STRING'].gsub(/;([^\/]*)/, '')
           new_params = matrix_params.collect do |component, params|
             params.collect { |k,v| "#{component}[#{k}]=#{CGI::escape(v.to_s)}" }
           end.flatten


Mime
View raw message