diff options
Diffstat (limited to 'spec/ruby/core/string/fixtures/classes.rb')
-rw-r--r-- | spec/ruby/core/string/fixtures/classes.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/ruby/core/string/fixtures/classes.rb b/spec/ruby/core/string/fixtures/classes.rb index 1cc7600abb..26fcd51b5d 100644 --- a/spec/ruby/core/string/fixtures/classes.rb +++ b/spec/ruby/core/string/fixtures/classes.rb @@ -46,4 +46,15 @@ module StringSpecs self.replace(str) end end + + class SpecialVarProcessor + def process(match) + if $~ != nil + str = $~[0] + else + str = "unset" + end + "<#{str}>" + end + end end |