made warden dev ready for ruby 1.9.x #36

Merged
merged 1 commit into from Nov 24, 2011

Conversation

Projects
None yet
2 participants
@linki
Contributor

linki commented Nov 24, 2011

hi,

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{}

to

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.

sincerely,
linki

@linki

This comment has been minimized.

Show comment
Hide comment
@linki

linki Nov 24, 2011

Contributor

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

Contributor

linki commented Nov 24, 2011

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

josevalim added a commit that referenced this pull request Nov 24, 2011

Merge pull request #36 from linki/master
made warden dev ready for ruby 1.9.x

@josevalim josevalim merged commit 6c4ab3c into wardencommunity:master Nov 24, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment