berkesokhan / rubydotnetcompiler

Automatically exported from code.google.com/p/rubydotnetcompiler
1 stars 0 forks source link

"1 =~ //" should return false, not throw TypeError #43

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Possibly a bug in the "MATCH" AST node (Operators.cs).

Currently it generates a rhs.=~(lhs) call, while the correct behaviour 
seems to be lhs.=~(rhs)

CRuby does use speed optimisations for 'str'=~/pat/ by calling rb_reg_match
(pat, str) and for /pat/=~any by calling rb_reg_match(pat, any).

Original issue reported on code.google.com by sason...@gmail.com on 11 Oct 2007 at 7:53

GoogleCodeExporter commented 9 years ago

Original comment by meaningi...@gmail.com on 16 Oct 2007 at 7:07