diff options
| author | Daniel Bovensiepen <[email protected]> | 2013-06-15 03:53:50 +0800 |
|---|---|---|
| committer | Daniel Bovensiepen <[email protected]> | 2013-06-15 03:53:50 +0800 |
| commit | 373122a299ebec890cfaa95ee41fde221ac6a543 (patch) | |
| tree | 346e79bb8a30a4e0b4102babf7dd9407beb36979 /mrblib/string.rb | |
| parent | ad07d41bd1b42fe7d23e04361839f511c5f9cd7f (diff) | |
| parent | 961cd408a86580c4d428f56153da00fd46738e35 (diff) | |
| download | mruby-373122a299ebec890cfaa95ee41fde221ac6a543.tar.gz mruby-373122a299ebec890cfaa95ee41fde221ac6a543.zip | |
Merge upstream
Diffstat (limited to 'mrblib/string.rb')
| -rw-r--r-- | mrblib/string.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mrblib/string.rb b/mrblib/string.rb index 131d30446..49f87be8b 100644 --- a/mrblib/string.rb +++ b/mrblib/string.rb @@ -133,6 +133,18 @@ class String a = self[pos+1..-1] self.replace([b, value, a].join('')) end + + ## + # ISO 15.2.10.5.5 + def =~(re) + re =~ self + end + + ## + # ISO 15.2.10.5.27 + def match(re, &block) + re.match(self, &block) + end end ## |
