Commit 8f5017e7 authored by Yukihiro Matsumoto's avatar Yukihiro Matsumoto

raise NotImplementedError from regexp related string methods; close #319

parent ed9488f2
...@@ -33,6 +33,9 @@ class String ...@@ -33,6 +33,9 @@ class String
end end
### *** TODO *** ### ### *** TODO *** ###
unless Object.const_defined?(:Regexp)
raise NotImplementedError, "gsub not available (yet)"
end
end end
## ##
...@@ -60,6 +63,9 @@ class String ...@@ -60,6 +63,9 @@ class String
# ISO 15.2.10.5.32 # ISO 15.2.10.5.32
def scan(reg, &block) def scan(reg, &block)
### *** TODO *** ### ### *** TODO *** ###
unless Object.const_defined?(:Regexp)
raise NotImplementedError, "scan not available (yet)"
end
end end
## ##
...@@ -75,6 +81,9 @@ class String ...@@ -75,6 +81,9 @@ class String
end end
### *** TODO *** ### ### *** TODO *** ###
unless Object.const_defined?(:Regexp)
raise NotImplementedError, "sub not available (yet)"
end
end end
## ##
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment