summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
Diffstat (limited to 'sample')
-rw-r--r--sample/export.rb4
-rw-r--r--sample/exyacc.rb2
2 files changed, 4 insertions, 2 deletions
diff --git a/sample/export.rb b/sample/export.rb
index 750b5c1948..949e5b10bf 100644
--- a/sample/export.rb
+++ b/sample/export.rb
@@ -22,7 +22,9 @@ end
f = Foo.new
#Foo.private :printf
-Foo.public :foobar
+class Foo # redefines foobar's scope
+ public :foobar
+end
f.foobar
f.printf "%s\n", Foo
diff --git a/sample/exyacc.rb b/sample/exyacc.rb
index dafcb037cc..dbe0dee710 100644
--- a/sample/exyacc.rb
+++ b/sample/exyacc.rb
@@ -13,7 +13,7 @@ while gets()
gsub!(/'}'/, "'\002'")
gsub!('\*/', "\003\003")
gsub!("/\\*[^\003]*\003\003", '')
- while gsub!(/{[^}{]*}/, ''); end
+ while gsub!(/\{[^{}]*}/, ''); end
gsub!(/'\001'/, "'{'")
gsub!(/'\002'/, "'}'")
while gsub!(/^[ \t]*\n(\s)/, '\1'); end