You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ref.rb:6:in `alias_method': undefined method `snake_case' for module `#<Module:0x200>' (NameError)
from ref.rb:6:in `block in SnakeCase'
from ref.rb:2:in `refine'
from ref.rb:2:in `SnakeCase'
from ref.rb:1:in `<main>'
The text was updated successfully, but these errors were encountered:
I am experimenting with TruffleRuby as well and ran into the same issue. alias/alias_method works for existing methods but not methods declared inside the refinement.
Here is a simple set of cases for reproduction:
moduleExampleRefinements# DOESN'T WORKrefineIntegerdodeftestingself.absend# or alias_methodaliastesttestingend# WORKS# refine Integer do# def testing# self.abs# end## def test# testing# end# end# WORKS# refine Integer do# def testing# self.abs# end# # or alias_method# alias test abs# endendusingExampleRefinementsputs -1.testingputs -1.testputs -1.testing == -1.test
To reproduce:
Error:
The text was updated successfully, but these errors were encountered: