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

Syntax error tLABEL using ruby 1.9.1 #31

Closed
wwright2 opened this issue Jan 25, 2016 · 4 comments
Closed

Syntax error tLABEL using ruby 1.9.1 #31

wwright2 opened this issue Jan 25, 2016 · 4 comments

Comments

@wwright2
Copy link

ruby 1.9.3p547 (2014-05-14 revision 45962) [arm-linux-eabi]

main.rb:5:in `require': /usr/lib/ruby/gems/1.9.1/gems/parseconfig-1.0.7/lib/parseconfig.rb:31: syntax error, unexpected tLABEL (SyntaxError)
  def initialize(config_file=nil, separator='=', comments: ['#', ';'])
                                                           ^
/usr/lib/ruby/gems/1.9.1/gems/parseconfig-1.0.7/lib/parseconfig.rb:31: syntax error, unexpected ')', expecting keyword_end
/usr/lib/ruby/gems/1.9.1/gems/parseconfig-1.0.7/lib/parseconfig.rb:208: syntax error, unexpected keyword_end, expecting $end
        from main.rb:5:in `<main>'

I changed
comments: ['#', ';']
to
comments= ['#', ';']

Which seems to fix my issue....but I am sure there is an explanation, I just don't see it, thx.

@derks
Copy link
Member

derks commented Jan 26, 2016

Looks like an incompatibility with Ruby < 2.0 (named positional arguments). Going to switch comments: ['#', ';'] to comments=['#', ';'] like you mentioned as we don't want to break backward compatibility in stable/1.0.x and this a new feature.

Thank you for the report.

@derks
Copy link
Member

derks commented Jan 26, 2016

@wwright2 you got the above syntax error just by requiring parseconfig? Unsure why Travis CI tests passed on 1.8 and 1.9 then...

derks added a commit that referenced this issue Jan 26, 2016
derks added a commit that referenced this issue Jan 26, 2016
@derks
Copy link
Member

derks commented Jan 26, 2016

Thanks for the feedback. Pushing out 1.0.8.

@derks derks closed this as completed Jan 26, 2016
@wwright2
Copy link
Author

Thanks. Checked out and using 1.0.8.

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

2 participants