Project

General

Profile

Bug #5625 » pejorative_20111128.patch

Newer version of patch for pejoratives - agrimm (Andrew Grimm), 11/28/2011 09:43 PM

View differences:

lib/rdoc/markup/to_bs.rb
# Adds bold or underline mixed with backspaces
def convert_string string
return string unless string.respond_to? :chars # your ruby is lame
return string unless string.respond_to? :chars # your ruby is legacy
return string unless @in_b or @in_em
chars = if @in_b then
string.chars.map do |char| "#{char}\b#{char}" end
lib/rubygems.rb
%w[cache doc gems specifications].each do |name|
subdir = File.join dir, name
next if File.exist? subdir
FileUtils.mkdir_p subdir rescue nil # in case of perms issues -- lame
FileUtils.mkdir_p subdir rescue nil # in case of perms issues
end
ensure
File.umask old_umask
test/rubygems/test_gem_remote_fetcher.rb
def test_fetch_size_socket_error
fetcher = Gem::RemoteFetcher.new nil
def fetcher.connection_for(uri)
raise SocketError, "tarded"
raise SocketError, "sample error message"
end
uri = 'http://gems.example.com/yaml'
......
fetcher.fetch_size uri
end
assert_equal "SocketError: tarded (#{uri})", e.message
assert_equal "SocketError: sample error message (#{uri})", e.message
end
def test_no_proxy
(6-6/6)