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

Correct invocation causing syntax error on Ruby 2.5 #20828

Merged
merged 1 commit into from Feb 23, 2018
Merged

Conversation

islemaster
Copy link
Contributor

@islemaster islemaster commented Feb 22, 2018

In #20783 while updating some tests I added some calls that use this syntax:

# for a method that takes two arguments and a block
my_method 'arg1', 'arg2' {|block_arg| => block_arg}

@wjordan is working on upgrading us to Ruby 2.5 and reported that this is a syntax error in the newer version of Ruby.

Should be fixed by using parens for the arguments.

my_method('arg1', 'arg2') {|block_arg| => block_arg}

Tested the updated syntax in irb with Ruby 2.5.0.

@islemaster islemaster merged commit 2330c7f into staging Feb 23, 2018
@islemaster
Copy link
Contributor Author

Merged without review, we already discussed this and it's a safe/necessary fix.

@islemaster islemaster deleted the syntax-error branch February 23, 2018 17:32
Copy link
Contributor

@wjordan wjordan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great, thanks for the followup on this! 👍

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

Successfully merging this pull request may close these issues.

None yet

2 participants