appoxy / aws

Amazon Web Services (AWS) Ruby Gem
https://rubygems.org/gems/aws
236 stars 87 forks source link

Fix for JRuby LocalJumpError #100

Closed dgb closed 13 years ago

dgb commented 13 years ago

Hello,

When using the aws gem under JRuby (I'm testing under 1.6.5), I noticed intermittent crashing with a "LocalJumpError". I would make a failing test case, but it's more of an acceptance issue, so I'm not sure exactly where I'd put that. In any case, you can reproduce with:

ruby -rubygems -e "require 'aws'; loop { Aws::S3.new(ENV['AWS_ID'], ENV['AWS_SECRET']).buckets }"

Where I have environment variables set for my AWS credentials.

I think the issue has something to do with a difference in how MRI and JRuby represent begin/end blocks internally, but I didn't dig too far into it. Let me know if you have any questions or comments.