YusukeIwaki/puppeteer-ruby

NoMethodError: undefined method `Symbol' for main:Object

Closed this issue · 3 comments

Step To Reproduce / Observed behavior

spring rails c
[1] pry(main)> require 'puppeteer'
NoMethodError: undefined method `Symbol' for main:Object
from /Users/amirsharif/.rvm/gems/ruby-2.7.2/gems/puppeteer-ruby-0.32.2/lib/puppeteer/events.rb:31:in `<top (required)>'

Expected behavior

Environment

ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-darwin20]

If I manually define:

def Symbol(str)
      Digest::MD5.hexdigest(str)
    end

It will work. Although this seems unnecessary.

#107

This issue shows a workaround, but the main cause is the needless Refinement and should be fixed. Symbol should be defined as a normal module function.

@Overload119 Thank you for kind bug reporting. This issue is fixed on puppeteer-ruby 0.32.3. Could you try it?