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

SyntaxError with Ruby 2.2.10 #13

Open
etagwerker opened this issue Apr 27, 2019 · 0 comments
Open

SyntaxError with Ruby 2.2.10 #13

etagwerker opened this issue Apr 27, 2019 · 0 comments

Comments

@etagwerker
Copy link
Contributor

Hey @jnraine,

These are some issues that I ran into when testing the gem with Ruby 2.2.10. It's a follow up issue to #9.

SyntaxError: /Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/gems/ten_years_rails-0.2.0/lib/deprecation_tracker.rb:121: syntax error, unexpected '.'
    new_shitlist&.delete
                  ^
/Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:in `require'
/Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:in `block in require'
/Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:in `require'
/Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/gems/ten_years_rails-0.2.0/lib/ten_years_rails.rb:2:in `<top (required)>'
/Users/etagwerker/Projects/fastruby/e-petitions/config/application.rb:7:in `<top (required)>'
/Users/etagwerker/Projects/fastruby/e-petitions/Rakefile:4:in `require'
/Users/etagwerker/Projects/fastruby/e-petitions/Rakefile:4:in `<top (required)>'
/Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
/Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/bin/ruby_executable_hooks:24:in `eval'
/Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/bin/ruby_executable_hooks:24:in `<main>'
(See full trace by running task with --trace)

Root cause: Ampersand operator was introduced in Ruby 2.3.0 (more here: http://mitrev.net/ruby/2015/11/13/the-operator-in-ruby/)

SyntaxError: /Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/gems/ten_years_rails-0.2.0/lib/deprecation_tracker.rb:88: syntax error, unexpected <<
      message = <<~MESSAGE.red
                  ^
/Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/gems/ten_years_rails-0.2.0/lib/deprecation_tracker.rb:95: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '('
        To check your failures locally, you can run:
                ^
/Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/gems/ten_years_rails-0.2.0/lib/deprecation_tracker.rb:95: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '('
        To check your failures locally, you can run:
                                               ^
/Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/gems/ten_years_rails-0.2.0/lib/deprecation_tracker.rb:97: dynamic constant assignment
        DEPRECATION_TRACKER=compare bundle exec rspec #{c...
                            ^
/Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/gems/ten_years_rails-0.2.0/lib/deprecation_tracker.rb:97: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '('
...RECATION_TRACKER=compare bundle exec rspec #{changed_buckets...
...                               ^
/Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/gems/ten_years_rails-0.2.0/lib/deprecation_tracker.rb:103: syntax error, unexpected $undefined, expecting keyword_do or '{' or '('
        See \e[4;37mdev-docs/testing/depre...
             ^
/Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/gems/ten_years_rails-0.2.0/lib/deprecation_tracker.rb:103: syntax error, unexpected ';', expecting ']'
        See \e[4;37mdev-docs/testing/deprecati...
                 ^
/Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/gems/ten_years_rails-0.2.0/lib/deprecation_tracker.rb:103: syntax error, unexpected $undefined, expecting keyword_end
...testing/deprecation_tracker.md\e[0;31m for more information.
...                               ^
/Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/gems/ten_years_rails-0.2.0/lib/deprecation_tracker.rb:103: syntax error, unexpected ';', expecting ']'
...ing/deprecation_tracker.md\e[0;31m for more information.
...                               ^
/Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/gems/ten_years_rails-0.2.0/lib/deprecation_tracker.rb:103: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '('
...md\e[0;31m for more information.
...                               ^
/Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/gems/ten_years_rails-0.2.0/lib/deprecation_tracker.rb:121: syntax error, unexpected '.'
    new_shitlist&.delete
                  ^
/Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:in `require'
/Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:in `block in require'
/Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:in `require'
/Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/gems/ten_years_rails-0.2.0/lib/ten_years_rails.rb:2:in `<top (required)>'
/Users/etagwerker/Projects/fastruby/e-petitions/config/application.rb:7:in `<top (required)>'
/Users/etagwerker/Projects/fastruby/e-petitions/Rakefile:4:in `require'
/Users/etagwerker/Projects/fastruby/e-petitions/Rakefile:4:in `<top (required)>'
/Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
/Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/bin/ruby_executable_hooks:24:in `eval'
/Users/etagwerker/.rvm/gems/ruby-2.2.10@petitions/bin/ruby_executable_hooks:24:in `<main>'
(See full trace by running task with --trace)

Root cause: The squiggly operator was introduced in Ruby 2.3.0 (more here: https://infinum.co/the-capsized-eight/multiline-strings-ruby-2-3-0-the-squiggly-heredoc)

I'm working on a PR for these issues. I'll submit it later today.

Thanks!

This was referenced Apr 27, 2019
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 a pull request may close this issue.

1 participant