Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of stabby lambda's is breaking jRuby support #21

Closed
chrsgrrtt opened this issue Nov 17, 2014 · 4 comments
Closed

Use of stabby lambda's is breaking jRuby support #21

chrsgrrtt opened this issue Nov 17, 2014 · 4 comments

Comments

@chrsgrrtt
Copy link

There is a syntax error when using jRuby resulting from the use of stabby lamdba's. Tested with jruby 1.7.16 in 1.9 mode, so likely to exist on earlier versions.

One example can be found in request_expectations.rb where
-> (data) { expect(data.size).to eq(expected_size) }
could be replaced with
->(data) { expect(data.size).to eq(expected_size) }
to avoid syntax errors (note the removal of the space after the dash rocket).

@brooklynDev
Copy link
Owner

Good catch. To be honest, we never tested this on jRuby, but if that's all it takes, I made the fix. See here:

b9b8e81

@chrsgrrtt
Copy link
Author

Ahhh, should have checked back, just forked and did the same :)

@brooklynDev
Copy link
Owner

Yea, I figured it was simple enough, so I just went ahead and did it. Sorry about that :)

@namxam
Copy link

namxam commented Jul 14, 2015

Unfortunately, the error is back with the latest version:

SyntaxError: /Users/maximilianschulz/.rvm/gems/jruby-1.7.20/gems/airborne-0.1.16/lib/airborne/request_expectations.rb:56: syntax error, unexpected tLPAREN_ARG
      -> (value) { yield DateTime.parse(value) }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants