Does not work if there are Ruby 3.0 one line methods in the code
volhit opened this issue · 2 comments
volhit commented
Got Racc::ParseError - (string):3 :: parse error on value "=" (tEQL)
Code example that break execution:
module ToBoolean
refine Object do
def to_bool = ActiveRecord::Type::Boolean.new.cast(self)
end
refine TrueClass do
def to_bool = self
end
refine FalseClass do
def to_bool = self
end
refine NilClass do
def to_bool = self
end
refine Numeric do
def to_bool = !zero?
end
end
DamirSvrtan commented
Hi! This is usually due to the ruby_parser not supporting that version of Ruby. It seems they however do support Ruby 3.0, can you post which version of it are you using?
DamirSvrtan commented
There has been no follow up 3 months after my comment, closing out.