pzol / monadic

helps dealing with exceptional situations, it comes from the sphere of functional programming and bringing the goodies I have come to love in Scala to my ruby projects
MIT License
229 stars 20 forks source link

method_missing was acting like coerce but with a bad return value #12

Closed trashhalo closed 8 years ago

trashhalo commented 8 years ago

Coerce requires a two array return. in jruby 9.0.1.0 if you do BigDecimal.new(1) == Nothing it raises an error complaining about the return of coerce from Nothing. Defining a coerce method to allow it to properly realize it is not coercable.