From 57bb23ce3da8da569b2d326e1dad60351fed6f10 Mon Sep 17 00:00:00 2001 From: James Lee Date: Thu, 8 Nov 2012 09:55:29 -0600 Subject: [PATCH] Fix 1.9ism that breaks specs on 1.8 --- spec/support/shared/examples/typed_path.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/support/shared/examples/typed_path.rb b/spec/support/shared/examples/typed_path.rb index d393fdb06b..a6e9b4a274 100644 --- a/spec/support/shared/examples/typed_path.rb +++ b/spec/support/shared/examples/typed_path.rb @@ -1,4 +1,5 @@ -shared_examples_for 'typed_path' do |map={}| +shared_examples_for 'typed_path' do |map| + map ||= {} if map.length < 1 raise ArgumentError, "type_path shared example requires a hash mapping the type constant name to the directory name: " \ @@ -24,4 +25,4 @@ shared_examples_for 'typed_path' do |map={}| first_directory.should == directory end end -end \ No newline at end of file +end