Skip to content


made warden dev ready for ruby 1.9.x #36

merged 1 commit into from

2 participants



i wanted to understand wardens implementation and ran into two problems when setting the project up on my mac. i noticed two problems that are related to the changes from ruby 1.8 to 1.9

firstly, it complaint when sending strip! to warden's version string in the gemspec because it was freezed. looking at device's way to do it i changed line 7 in warden's gemspec to dup the string

s.version = Warden::VERSION.dup

secondly, the specs did complain about wrong number of arguments for some methods and failed. turned out that the single argument that is passed to a rack application's call method gets also applied to a nested block that was created with lambda{} in ruby 1.9. so i changed

blk = opts[:configurator] || lambda{}


blk = opts[:configurator] || proc{}

which works fine and passes all test in 1.9 now. nevertheless, i don't know whether the change breaks anything i might not understand at the moment. but since it's just a test helper method it shouldn't be much of a problem if it did.



blk = opts[:configurator] || lambda{} is used in setup_rack in spec/helpers/request_helper.rb line 18

@josevalim josevalim merged commit 6c4ab3c into hassox:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 24, 2011
  1. made warden dev ready for ruby 1.9.x

    Martin Linkhorst committed
Showing with 3 additions and 3 deletions.
  1. +1 −1 Gemfile.lock
  2. +1 −1 spec/helpers/request_helper.rb
  3. +1 −1 warden.gemspec
2 Gemfile.lock
@@ -1,7 +1,7 @@
remote: .
- warden (1.0.7)
+ warden (1.1.0)
rack (>= 1.0)
2 spec/helpers/request_helper.rb
@@ -15,7 +15,7 @@ def setup_rack(app = nil, opts = {}, &block)
opts[:failure_app] ||= failure_app
opts[:default_strategies] ||= [:password]
opts[:default_serializers] ||= [:session]
- blk = opts[:configurator] || lambda{}
+ blk = opts[:configurator] || proc{} do
use opts[:session] || Warden::Spec::Helpers::Session
2 warden.gemspec
@@ -4,7 +4,7 @@ require './lib/warden/version' do |s| = %q{warden}
- s.version = Warden::VERSION
+ s.version = Warden::VERSION.dup
s.authors = ["Daniel Neighman"] = %q{2011-07-27} = %q{}
Something went wrong with that request. Please try again.