Issue #8847 has been reported by charliesome (Charlie Somerville).

----------------------------------------
Bug #8847: opt_regexpmatch2 does not use method caching
https://bugs.ruby-lang.org/issues/8847

Author: charliesome (Charlie Somerville)
Status: Open
Priority: Normal
Assignee: charliesome (Charlie Somerville)
Category: 
Target version: 
ruby -v: ruby 2.1.0dev (2013-08-31 trunk 42741) [x86_64-darwin12.4.0]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


The opt_regexpmatch2 instruction does not use method caching, instead it uses rb_funcall internally.

opt_regexpmatch2 is emitted by the compiler when a literal regexp is on the right hand side of the =~ operator.

This means a full method lookup must be performed every time the receiver of the =~ method call is not a String.


-- 
http://bugs.ruby-lang.org/