summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_rubyoptions.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index 0f608cd8a5..ddfd5f1883 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -450,13 +450,13 @@ class TestRubyOptions < Test::Unit::TestCase
["begin", "rescue ; end"],
["begin rescue", "else ; end"],
["begin", "ensure ; end"],
- ["case nil", "when true; end"],
+ [" case nil", "when true; end"],
["case nil; when true", "end"],
].each do
|b, e = 'end'|
src = ["#{b}\n", " #{e}\n"]
- k = b[/\A\S+/]
- e = e[/\A\S+/]
+ k = b[/\A\s*(\S+)/, 1]
+ e = e[/\A\s*(\S+)/, 1]
a.for("no directives with #{b}") do
err = ["#{t.path}:2: warning: mismatched indentations at '#{e}' with '#{k}' at 1"]