psyho / bogus

Fake library for Ruby
Other
359 stars 14 forks source link

Fix block and rest names on Ruby 2.7 #77

Closed chastell closed 2 weeks ago

chastell commented 2 weeks ago

Running rspec on Ruby 2.7 blows up:

     Failure/Error: klass.instance_eval(body)

     SyntaxError:
       (eval):1: syntax error, unexpected &&, expecting & or '&'
             def forty_two!(**, &&)
                                ^~
       (eval):2: syntax error, unexpected ','
       ...    __record__(:forty_two!, **, &&)
       ...                              ^

This renames the block and rest symbols from :& and :* so the code generation works.

psyho commented 2 weeks ago

Thank you!