summaryrefslogtreecommitdiff
path: root/sample/exyacc.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-05 15:38:16 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-05 15:38:16 +0000
commitadd23cc22ee306d4aa3e2ec04883564554b5f582 (patch)
tree436158ad848b6142d19ed247db71d5f7a3df3d8c /sample/exyacc.rb
parent267b39cfb4e6acb233af8eccda3c30060285a580 (diff)
* sample/exyacc.rb: use Regexp in gsub!.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/exyacc.rb')
-rw-r--r--sample/exyacc.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/sample/exyacc.rb b/sample/exyacc.rb
index 908ba6c..b8d49d6 100644
--- a/sample/exyacc.rb
+++ b/sample/exyacc.rb
@@ -11,8 +11,8 @@ while gets()
sub!(/.*\n/, "")
gsub!(/'\{'/, "'\001'")
gsub!(/'}'/, "'\002'")
- gsub!('\*/', "\003\003")
- gsub!("/\\*[^\003]*\003\003", '')
+ gsub!(%r{\*/}, "\003\003")
+ gsub!(%r{/\*[^\003]*\003\003}, '')
while gsub!(/\{[^{}]*}/, ''); end
gsub!(/'\001'/, "'{'")
gsub!(/'\002'/, "'}'")