[macruby-changes] [2466] MacRuby/trunk/lib/rubygems/remote_fetcher.rb
source_changes at macosforge.org
source_changes at macosforge.org
Thu Sep 3 22:30:34 PDT 2009
Revision: 2466
http://trac.macosforge.org/projects/ruby/changeset/2466
Author: lsansonetti at apple.com
Date: 2009-09-03 22:30:31 -0700 (Thu, 03 Sep 2009)
Log Message:
-----------
don't forget to require foundation in the remote fetcher fast path
Modified Paths:
--------------
MacRuby/trunk/lib/rubygems/remote_fetcher.rb
Modified: MacRuby/trunk/lib/rubygems/remote_fetcher.rb
===================================================================
--- MacRuby/trunk/lib/rubygems/remote_fetcher.rb 2009-09-04 02:56:01 UTC (rev 2465)
+++ MacRuby/trunk/lib/rubygems/remote_fetcher.rb 2009-09-04 05:30:31 UTC (rev 2466)
@@ -235,15 +235,16 @@
# XXX we are taking a _much faster_ code path here, this change should be
# removed once we re-implement the IO subsystem (and therefore Net::HTTP)
# on top of CF.
+ framework 'Foundation'
url = NSURL.URLWithString(uri.to_s)
data = NSMutableData.dataWithContentsOfURL(url)
if data.nil?
- raise Gem::RemoteFetcher::FetchError, "error when fetching data from #{uri}"
+ raise Gem::RemoteFetcher::FetchError, "error when fetching data from #{uri}"
end
string = String.__new_bytestring__(data)
#block.call(string) if block
return string
- end
+ end
raise "block is dead" if block_given?
return open(get_file_uri_path(uri)) if file_uri? uri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090903/436b63bb/attachment.html>
More information about the macruby-changes
mailing list