diff options
| author | Paolo Bosetti <[email protected]> | 2012-08-06 15:02:03 +0200 |
|---|---|---|
| committer | Paolo Bosetti <[email protected]> | 2012-08-06 15:02:56 +0200 |
| commit | aa0d2f91447c49363059f2e95cb9023f65a6fbef (patch) | |
| tree | 2cfa325956e62648f2161564adfdf6dddc45b737 /mrblib/string.rb | |
| parent | fd097b8aff7b91bd105fc1daec5a4050a947b763 (diff) | |
| parent | 193c98ae540d43d082795fd77ea81a4f6f7fd0f6 (diff) | |
| download | mruby-aa0d2f91447c49363059f2e95cb9023f65a6fbef.tar.gz mruby-aa0d2f91447c49363059f2e95cb9023f65a6fbef.zip | |
Updated Xcode project build settings in conformity with 10.8/Xcode 4.4
Diffstat (limited to 'mrblib/string.rb')
| -rw-r--r-- | mrblib/string.rb | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/mrblib/string.rb b/mrblib/string.rb index ad7e1fca1..d09b787da 100644 --- a/mrblib/string.rb +++ b/mrblib/string.rb @@ -33,12 +33,15 @@ class String end ### *** TODO *** ### + unless Object.const_defined?(:Regexp) + raise NotImplementedError, "gsub not available (yet)" + end end ## # Replace all matches of +pattern+ with +replacement+. # Call block (if given) for each match and replace - # +pattern+ with the value of the block. Modify + # +pattern+ with the value of the block. Modify # +self+ with the final value. # # ISO 15.2.10.5.19 @@ -56,15 +59,18 @@ class String # Calls the given block for each match of +pattern+ # If no block is given return an array with all # matches of +pattern+. - # + # # ISO 15.2.10.5.32 def scan(reg, &block) ### *** TODO *** ### + unless Object.const_defined?(:Regexp) + raise NotImplementedError, "scan not available (yet)" + end end ## - # Replace only the first match of +pattern+ with - # +replacement+. Call block (if given) for each + # Replace only the first match of +pattern+ with + # +replacement+. Call block (if given) for each # match and replace +pattern+ with the value of the # block. Return the final value. # @@ -75,12 +81,15 @@ class String end ### *** TODO *** ### + unless Object.const_defined?(:Regexp) + raise NotImplementedError, "sub not available (yet)" + end end ## - # Replace only the first match of +pattern+ with - # +replacement+. Call block (if given) for each - # match and replace +pattern+ with the value of the + # Replace only the first match of +pattern+ with + # +replacement+. Call block (if given) for each + # match and replace +pattern+ with the value of the # block. Modify +self+ with the final value. # # ISO 15.2.10.5.37 |
