From e6b3fc47d58c890990f0d4fb327f127c28374ed9 Mon Sep 17 00:00:00 2001 From: Mark VanderVoord Date: Thu, 18 Dec 2014 16:22:34 -0500 Subject: [PATCH] - (wow, working without my old 1.8.7 virtual machine stinks) --- test/test_helper.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test_helper.rb b/test/test_helper.rb index cd8a22a..4fed5bd 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -15,14 +15,14 @@ end def create_stub(funcs) stub = Class.new - if (RUBY_VERSION.split('.')[0].to_i >= 2) - funcs.each_pair {|k,v| stub.define_singleton_method(k) {|unused=nil| return v } } - else + #if (RUBY_VERSION.split('.')[0].to_i >= 2) + # funcs.each_pair {|k,v| stub.define_singleton_method(k) {|*unused| return v } } + #else blob = "class << stub\n" funcs.each_pair {|k,v| blob += "def #{k.to_s}(unused=nil)\n #{v.inspect}\nend\n" } blob += "end" eval blob - end + #end stub end