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

Error with ruby-2.7.0-preview1 #27

Open
maksar opened this issue Oct 4, 2019 · 1 comment
Open

Error with ruby-2.7.0-preview1 #27

maksar opened this issue Oct 4, 2019 · 1 comment

Comments

@maksar
Copy link

maksar commented Oct 4, 2019

I was experiencing troubles with 'telegram/bot' file from 'telegram-bot-ruby' gem due to the 'coercible' library in ruby-2.7.0-preview1 interpreter.

Error boils down to Undefined = Class.new.freeze line inside options.rb file.

 git:(master) ✗ irb
2.7.0-preview1 :001 > require 'coercible'
Traceback (most recent call last):
       13: from /Users/a.shestakov/.rvm/rubies/ruby-2.7.0-preview1/bin/irb:23:in `<main>'
       12: from /Users/a.shestakov/.rvm/rubies/ruby-2.7.0-preview1/bin/irb:23:in `load'
       11: from /Users/a.shestakov/.rvm/rubies/ruby-2.7.0-preview1/lib/ruby/gems/2.7.0/gems/irb-1.0.0/exe/irb:11:in `<top (required)>'
       10: from (irb):1
        9: from /Users/a.shestakov/.rvm/rubies/ruby-2.7.0-preview1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:34:in `require'
        8: from /Users/a.shestakov/.rvm/rubies/ruby-2.7.0-preview1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:130:in `rescue in require'
        7: from /Users/a.shestakov/.rvm/rubies/ruby-2.7.0-preview1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:130:in `require'
        6: from /Users/a.shestakov/.rvm/gems/ruby-2.7.0-preview1/gems/coercible-1.0.0/lib/coercible.rb:27:in `<top (required)>'
        5: from /Users/a.shestakov/.rvm/rubies/ruby-2.7.0-preview1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        4: from /Users/a.shestakov/.rvm/rubies/ruby-2.7.0-preview1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        3: from /Users/a.shestakov/.rvm/gems/ruby-2.7.0-preview1/gems/coercible-1.0.0/lib/support/options.rb:1:in `<top (required)>'
        2: from /Users/a.shestakov/.rvm/gems/ruby-2.7.0-preview1/gems/coercible-1.0.0/lib/support/options.rb:4:in `<module:Coercible>'
        1: from /Users/a.shestakov/.rvm/gems/ruby-2.7.0-preview1/gems/coercible-1.0.0/lib/support/options.rb:5:in `<module:Options>'
FrozenError (can't modify frozen #<Class:#<Class:0x00007fab142f84f8>>)
@cimnine
Copy link

cimnine commented Oct 20, 2019

I have the same problem when using reek with Ruby 2.7:

$ ruby -v
ruby 2.7.0preview1 (2019-05-31 trunk c55db6aa271df4a689dc8eb0039c929bf6ed43ff) [x86_64-linux]
$ bundle exec reek
bundler: failed to load command: reek (/usr/local/bundle/bin/reek)
FrozenError: can't modify frozen #<Class:#<Class:0x000055d2e063e468>>
  /usr/local/bundle/gems/coercible-1.0.0/lib/support/options.rb:5:in `<module:Options>'
  /usr/local/bundle/gems/coercible-1.0.0/lib/support/options.rb:4:in `<module:Coercible>'
  /usr/local/bundle/gems/coercible-1.0.0/lib/support/options.rb:1:in `<top (required)>'
  /usr/local/bundle/gems/coercible-1.0.0/lib/coercible.rb:27:in `require'
  /usr/local/bundle/gems/coercible-1.0.0/lib/coercible.rb:27:in `<top (required)>'
  /usr/local/bundle/gems/virtus-1.0.5/lib/virtus.rb:246:in `require'
  /usr/local/bundle/gems/virtus-1.0.5/lib/virtus.rb:246:in `<top (required)>'
  /usr/local/bundle/gems/codeclimate-engine-rb-0.4.1/lib/cc_engine/issue.rb:1:in `require'
  /usr/local/bundle/gems/codeclimate-engine-rb-0.4.1/lib/cc_engine/issue.rb:1:in `<top (required)>'
  /usr/local/bundle/gems/codeclimate-engine-rb-0.4.1/lib/codeclimate_engine.rb:2:in `require'
  /usr/local/bundle/gems/codeclimate-engine-rb-0.4.1/lib/codeclimate_engine.rb:2:in `<top (required)>'
  /usr/local/bundle/gems/reek-5.4.0/lib/reek/report/code_climate/code_climate_formatter.rb:3:in `require'
  /usr/local/bundle/gems/reek-5.4.0/lib/reek/report/code_climate/code_climate_formatter.rb:3:in `<top (required)>'
  /usr/local/bundle/gems/reek-5.4.0/lib/reek/report/code_climate.rb:4:in `require_relative'
  /usr/local/bundle/gems/reek-5.4.0/lib/reek/report/code_climate.rb:4:in `<top (required)>'
  /usr/local/bundle/gems/reek-5.4.0/lib/reek/report.rb:3:in `require_relative'
  /usr/local/bundle/gems/reek-5.4.0/lib/reek/report.rb:3:in `<top (required)>'
  /usr/local/bundle/gems/reek-5.4.0/lib/reek.rb:8:in `require_relative'
  /usr/local/bundle/gems/reek-5.4.0/lib/reek.rb:8:in `<top (required)>'
  /usr/local/bundle/gems/reek-5.4.0/bin/reek:9:in `require_relative'
  /usr/local/bundle/gems/reek-5.4.0/bin/reek:9:in `<top (required)>'
  /usr/local/bundle/bin/reek:23:in `load'
  /usr/local/bundle/bin/reek:23:in `<top (required)>'

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