1
0
Fork 0
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:
matz 2006-08-08 10:29:02 +00:00
parent 6297f4c8bc
commit 8b5942801d
3 changed files with 12 additions and 3 deletions

View file

@ -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>
* parse.y (arg): allow newlines before ternary colon. [ruby-dev:29189]

2
README
View file

@ -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.
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
add module names if not present), if you want to link modules

View file

@ -1330,6 +1330,7 @@ class Resolv
def get_unpack(template)
len = 0
template.each_byte {|byte|
byte = "%c" % byte
case byte
when ?c, ?C
len += 1
@ -1348,7 +1349,7 @@ class Resolv
end
def get_string
len = @data[@index]
len = @data[@index].ord
raise DecodeError.new("limit exceeded") if @limit < @index + 1 + len
d = @data[@index + 1, len]
@index += 1 + len
@ -1371,7 +1372,7 @@ class Resolv
limit = @index if !limit || @index < limit
d = []
while true
case @data[@index]
case @data[@index].ord
when 0
@index += 1
return d