[macruby-changes] [1307] MacRuby/branches/experimental/mspec/lib/mspec/mocks/mock.rb
source_changes at macosforge.org
source_changes at macosforge.org
Fri Apr 3 16:41:02 PDT 2009
Revision: 1307
http://trac.macosforge.org/projects/ruby/changeset/1307
Author: lsansonetti at apple.com
Date: 2009-04-03 16:41:02 -0700 (Fri, 03 Apr 2009)
Log Message:
-----------
removed dirty workaround now that return-in-a-block works
Modified Paths:
--------------
MacRuby/branches/experimental/mspec/lib/mspec/mocks/mock.rb
Modified: MacRuby/branches/experimental/mspec/lib/mspec/mocks/mock.rb
===================================================================
--- MacRuby/branches/experimental/mspec/lib/mspec/mocks/mock.rb 2009-04-03 23:40:34 UTC (rev 1306)
+++ MacRuby/branches/experimental/mspec/lib/mspec/mocks/mock.rb 2009-04-03 23:41:02 UTC (rev 1307)
@@ -94,7 +94,6 @@
key = replaced_key obj, sym
proxies = mocks[key] + stubs[key]
- res_ok = false; res = nil # MR hack
proxies.each do |proxy|
pass = case proxy.arguments
when :any_args
@@ -127,13 +126,10 @@
if pass
proxy.called
- #return proxy.returning
- res_ok = true; res = proxy.returning # MR hack
+ return proxy.returning
end
end
- return res if res_ok # MR hack
-
if sym.to_sym == :respond_to?
return obj.__send__(replaced_name(obj, sym), compare)
else
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090403/52a36c57/attachment.html>
More information about the macruby-changes
mailing list