From: Tanaka Akira Date: 2013-09-27T01:51:31+09:00 Subject: [ruby-core:57407] Re: [Backport 200 - Backport #8953] `str =~ /pattern/` does not call =~ method if (1) str is a String, (2) /pattern/ is a Regexp literal 2013/9/27 ko1 (Koichi Sasada) : > Issue #8953 has been updated by ko1 (Koichi Sasada). > And all of versions ignore the redefinition. > I implemented 1.9 VM as this behaviour because I think it is spec. I also think so. The spec is one of the reason Ruby can assign named capture to local variable. % ruby -e '/def(?.*)/ =~ "abcdefghi"; p var' "ghi" -- Tanaka Akira