mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/resolv.rb (Resolv::DNS::Message::MessageDecoder::get_string):
affected by str[0] returns 1 char string. [ruby-dev:29223] * lib/resolv.rb (Resolv::DNS::Message::MessageDecoder::get_labels): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6297f4c8bc
commit
8b5942801d
3 changed files with 12 additions and 3 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
Tue Aug 8 19:26:10 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/resolv.rb (Resolv::DNS::Message::MessageDecoder::get_string):
|
||||||
|
affected by str[0] returns 1 char string. [ruby-dev:29223]
|
||||||
|
|
||||||
|
* lib/resolv.rb (Resolv::DNS::Message::MessageDecoder::get_labels):
|
||||||
|
ditto.
|
||||||
|
|
||||||
Tue Aug 8 12:28:43 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Aug 8 12:28:43 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* parse.y (arg): allow newlines before ternary colon. [ruby-dev:29189]
|
* parse.y (arg): allow newlines before ternary colon. [ruby-dev:29189]
|
||||||
|
|
2
README
2
README
|
@ -62,7 +62,7 @@ This is what you need to do to compile and install Ruby:
|
||||||
|
|
||||||
2. Run ./configure, which will generate config.h and Makefile.
|
2. Run ./configure, which will generate config.h and Makefile.
|
||||||
|
|
||||||
3. Edit defines.h if you need. Probably this step will not need.
|
3. Edit defines.h if you need. Usually this step will not be needed.
|
||||||
|
|
||||||
4. Remove comment mark(#) before the module names from ext/Setup (or
|
4. Remove comment mark(#) before the module names from ext/Setup (or
|
||||||
add module names if not present), if you want to link modules
|
add module names if not present), if you want to link modules
|
||||||
|
|
|
@ -1330,6 +1330,7 @@ class Resolv
|
||||||
def get_unpack(template)
|
def get_unpack(template)
|
||||||
len = 0
|
len = 0
|
||||||
template.each_byte {|byte|
|
template.each_byte {|byte|
|
||||||
|
byte = "%c" % byte
|
||||||
case byte
|
case byte
|
||||||
when ?c, ?C
|
when ?c, ?C
|
||||||
len += 1
|
len += 1
|
||||||
|
@ -1348,7 +1349,7 @@ class Resolv
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_string
|
def get_string
|
||||||
len = @data[@index]
|
len = @data[@index].ord
|
||||||
raise DecodeError.new("limit exceeded") if @limit < @index + 1 + len
|
raise DecodeError.new("limit exceeded") if @limit < @index + 1 + len
|
||||||
d = @data[@index + 1, len]
|
d = @data[@index + 1, len]
|
||||||
@index += 1 + len
|
@index += 1 + len
|
||||||
|
@ -1371,7 +1372,7 @@ class Resolv
|
||||||
limit = @index if !limit || @index < limit
|
limit = @index if !limit || @index < limit
|
||||||
d = []
|
d = []
|
||||||
while true
|
while true
|
||||||
case @data[@index]
|
case @data[@index].ord
|
||||||
when 0
|
when 0
|
||||||
@index += 1
|
@index += 1
|
||||||
return d
|
return d
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue