Browse files

Update set_the_flash_matcher to also duplicate the used set to fix a …

…bug in Rubinius

Tests now also passed on Rubinius 2.0
  • Loading branch information...
1 parent 4450c86 commit 3d9439030b09208517311c1583beb0fe0a6c903b @sikachu sikachu committed Sep 19, 2011
Showing with 12 additions and 9 deletions.
  1. +1 −0 .gitignore
  2. +1 −0 .travis.yml
  3. +3 −3 gemfiles/3.0.gemfile
  4. +6 −6 gemfiles/3.1.gemfile
  5. +1 −0 lib/shoulda/matchers/action_controller/set_the_flash_matcher.rb
View
1 .gitignore
@@ -10,3 +10,4 @@ tmp
.bundle
Gemfile.lock
gemfiles/*.lock
+*.rbc
View
1 .travis.yml
@@ -3,6 +3,7 @@ rvm:
- 1.9.2
- 1.9.3
- ree
+ - rbx-2.0
- jruby
before_script:
View
6 gemfiles/3.0.gemfile
@@ -3,12 +3,12 @@
source "http://rubygems.org"
gem "rake", "~> 0.9.2"
-gem "sqlite3", :platform=>:ruby
-gem "activerecord-jdbc-adapter", :platform=>:jruby
gem "activerecord-jdbcsqlite3-adapter", :platform=>:jruby
-gem "jdbc-sqlite3", :platform=>:jruby
+gem "sqlite3", :platform=>:ruby
gem "jruby-openssl", :platform=>:jruby
gem "shoulda-context", "~> 1.0.0.beta1"
+gem "activerecord-jdbc-adapter", :platform=>:jruby
+gem "jdbc-sqlite3", :platform=>:jruby
gem "rails", "3.0.10"
gemspec :path=>"../"
View
12 gemfiles/3.1.gemfile
@@ -3,16 +3,16 @@
source "http://rubygems.org"
gem "rake", "~> 0.9.2"
-gem "sqlite3", :platform=>:ruby
-gem "activerecord-jdbc-adapter", :platform=>:jruby
gem "activerecord-jdbcsqlite3-adapter", :platform=>:jruby
-gem "jdbc-sqlite3", :platform=>:jruby
+gem "sqlite3", :platform=>:ruby
gem "jruby-openssl", :platform=>:jruby
gem "shoulda-context", "~> 1.0.0.beta1"
-gem "rails", "3.1.0"
-gem "uglifier"
-gem "jquery-rails"
gem "coffee-rails"
+gem "uglifier"
gem "sass-rails"
+gem "activerecord-jdbc-adapter", :platform=>:jruby
+gem "jdbc-sqlite3", :platform=>:jruby
+gem "jquery-rails"
+gem "rails", "3.1.0"
gemspec :path=>"../"
View
1 lib/shoulda/matchers/action_controller/set_the_flash_matcher.rb
@@ -68,6 +68,7 @@ def regexp_value_matches?
def flash
return @flash if @flash
@flash = @controller.flash.dup
+ @flash.instance_variable_set(:@used, @controller.flash.instance_variable_get(:@used).dup)
@flash.sweep unless @now
@flash
end

0 comments on commit 3d94390

Please sign in to comment.