From a48e74cb2f8ea7b5251f34de126a01b76fff63c2 Mon Sep 17 00:00:00 2001 From: Michael Dvorkin Date: Tue, 13 Dec 2011 16:01:14 -0800 Subject: [PATCH] Fixed methods array spec when running with Ruby 1.9.2+ --- spec/methods_spec.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spec/methods_spec.rb b/spec/methods_spec.rb index 32d154c..8081a6a 100644 --- a/spec/methods_spec.rb +++ b/spec/methods_spec.rb @@ -449,6 +449,10 @@ describe "Methods arrays" do it "appending garbage to methods array should not raise error" do arr = 42.methods << [ :wtf ] arr.ai(:plain => true).should_not raise_error(TypeError) - arr.ai(:plain => true).should =~ /\s+wtf\(\?\)\s+\?/ + if RUBY_VERSION < '1.9.2' + arr.ai(:plain => true).should =~ /\s+wtf\(\?\)\s+\?/ # [ :wtf ].to_s => "wtf" + else + arr.ai(:plain => true).should =~ /\s+\[:wtf\]\(\?\)\s+\?/ # [ :wtf ].to_s => [:wtf] + end end end