diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-17 20:58:34 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-17 20:58:34 +0000 |
commit | 51b031093069dd4a89e25b6057f1eca8c0c7e24e (patch) | |
tree | e06ff239b5647ee8ecb1d9c507a5655e683ad948 /lib/eregex.rb | |
parent | c611b6d0cc50af72847ddb7c1d0f31aa3b18da25 (diff) | |
download | ruby-51b031093069dd4a89e25b6057f1eca8c0c7e24e.tar.gz |
* lib/Env.rb, lib/base64.rb, lib/importenv.rb, lib/eregex.rb: removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/eregex.rb')
-rw-r--r-- | lib/eregex.rb | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/lib/eregex.rb b/lib/eregex.rb deleted file mode 100644 index cc7a7f6f46..0000000000 --- a/lib/eregex.rb +++ /dev/null @@ -1,37 +0,0 @@ -# this is just a proof of concept toy. - -class RegOr - def initialize(re1, re2) - @re1 = re1 - @re2 = re2 - end - - def =~ (str) - @re1 =~ str or @re2 =~ str - end -end - -class RegAnd - def initialize(re1, re2) - @re1 = re1 - @re2 = re2 - end - - def =~ (str) - @re1 =~ str and @re2 =~ str - end -end - -class Regexp - def |(other) - RegOr.new(self, other) - end - def &(other) - RegAnd.new(self, other) - end -end - -if __FILE__ == $0 - p "abc" =~ /b/|/c/ - p "abc" =~ /b/&/c/ -end |