Regexp pre_match

I looked in ruby documentation

http://www.ruby-doc.org/core-1.9.3/Regexp.html

I cannot find a method called pre_match but its used in Rails...

@template.instance_variable_get("@#{Regexp.last_match.pre_match}")

http://www.ruby-doc.org/core-1.9.3/MatchData.html#method-i-pre_match

yep, last_match returns a MatchData object, which contains some
wrapper methods, including a string of the last successful pattern
match. Hence, pre_match would fall under MatchData, not Regexp.