diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | lib/resolv.rb | 5 |
3 files changed, 12 insertions, 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> * parse.y (arg): allow newlines before ternary colon. [ruby-dev:29189] @@ -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 diff --git a/lib/resolv.rb b/lib/resolv.rb index 300901fdf0..deceeaba30 100644 --- a/lib/resolv.rb +++ b/lib/resolv.rb @@ -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 |