Closed tomlion closed 11 years ago
I still didn't figure out why Array === value return false when value is an array, but I have to send this pull request because someone else has the same problem: https://github.com/citrusbyte/ripple/commit/dc9c353c9df9a992bcab88d2f5703125a222e1e3
Using Module#=== explicitly isn't a good practice. In this case, value can be duck typing and overwrite the methods: is_a? and class, but Module#=== can't recognize it. I believe that's the reason why Array === value returns false.
I still didn't figure out why Array === value return false when value is an array, but I have to send this pull request because someone else has the same problem: https://github.com/citrusbyte/ripple/commit/dc9c353c9df9a992bcab88d2f5703125a222e1e3
Using Module#=== explicitly isn't a good practice. In this case, value can be duck typing and overwrite the methods: is_a? and class, but Module#=== can't recognize it. I believe that's the reason why Array === value returns false.