summaryrefslogtreecommitdiff
path: root/test/ruby/test_regexp.rb
diff options
context:
space:
mode:
-rw-r--r--test/ruby/test_regexp.rb14
1 files changed, 14 insertions, 0 deletions
@@ -1196,6 +1196,20 @@ class TestRegexp < Test::Unit::TestCase
}
end
def test_once
pr1 = proc{|i| /#{i}/o}
assert_equal(/0/, pr1.call(0))