diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-03-29 07:54:38 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-03-29 07:54:38 +0000 |
commit | 919f456de88e9e1011db8f6e4e484e1b25e77af4 (patch) | |
tree | e367d6d1ba65d30139ae43891b52edfe71be8fca /lib/resolv.rb | |
parent | 6a738f22656ffe247bcd02cf354c12a5370818ec (diff) |
* exception message clean-up by Ian Macdonald <ian@caliban.org>.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/resolv.rb')
-rw-r--r-- | lib/resolv.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/resolv.rb b/lib/resolv.rb index edc17c2f19..ad52882582 100644 --- a/lib/resolv.rb +++ b/lib/resolv.rb @@ -1157,9 +1157,9 @@ class Resolv @limit = @index + len d = yield(len) if @index < @limit - raise DecodeError.new("junk exist") + raise DecodeError.new("junk exists") elsif @limit < @index - raise DecodeError.new("limit exceed") + raise DecodeError.new("limit exceeded") end @limit = save_limit return d @@ -1185,7 +1185,7 @@ class Resolv raise StandardError.new("unsupported template: '#{byte.chr}' in '#{template}'") end } - raise DecodeError.new("limit exceed") if @limit < @index + len + raise DecodeError.new("limit exceeded") if @limit < @index + len arr = @data.unpack("@#{@index}#{template}") @index += len return arr @@ -1193,7 +1193,7 @@ class Resolv def get_string len = @data[@index] - raise DecodeError.new("limit exceed") if @limit < @index + 1 + len + raise DecodeError.new("limit exceeded") if @limit < @index + 1 + len d = @data[@index + 1, len] @index += 1 + len return d @@ -1554,7 +1554,7 @@ class Resolv raise ArgumentError.new("IPv4 address with invalid value: " + arg) end else - raise ArgumentError.new("cannot interprete as IPv4 address: #{arg.inspect}") + raise ArgumentError.new("cannot interpret as IPv4 address: #{arg.inspect}") end end @@ -1662,7 +1662,7 @@ class Resolv end return IPv6.new(address) else - raise ArgumentError.new("cannot interprete as IPv6 address: #{arg.inspect}") + raise ArgumentError.new("cannot interpret as IPv6 address: #{arg.inspect}") end end |