Bug #5625 » pejorative.patch
| 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 -- bad
|
||
|
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, "ouch"
|
||
|
end
|
||
|
uri = 'http://gems.example.com/yaml'
|
||
| ... | ... | |
|
fetcher.fetch_size uri
|
||
|
end
|
||
|
assert_equal "SocketError: tarded (#{uri})", e.message
|
||
|
assert_equal "SocketError: ouch (#{uri})", e.message
|
||
|
end
|
||
|
def test_no_proxy
|
||