mattn / mruby-onig-regexp

mrbgem of 鬼雲's Regular Expression
31 stars 36 forks source link

Should not raise TypeError with not Regexp object #38

Closed ksss closed 8 years ago

ksss commented 8 years ago
"a" == /a/ #=> false
/a/ == "a" #=> wrong argument type String (expected Data) (TypeError)

But, ISO say

15.2.15.7.3 Regexp#==
    a) If _other_ is not an instance of the class Regexp, return false
mattn commented 8 years ago

Thank you