[#5143] Win32API segfault in 1.8.3p1 — Nathaniel Talbott <ntalbott@...>
I'm on Windows XP, using VC7 to compile. I've previously gotten a good
Hi,
[#5151] COPY and INSTALL on Windows — Nathaniel Talbott <ntalbott@...>
1.8.3p1 has changed the defaults for the COPY and INSTALL Makefile
[#5152] 1.8.3 p1 segfault in array.c- bccwin32 - bcc5.5 (free) compiler bug — "daz" <dooby@...10.karoo.co.uk>
[#5160] Alternative for win32\ifchange.bat — "daz" <dooby@...10.karoo.co.uk>
[#5179] Cannot build HEAD on OS X 10.4.1 — Eric Hodel <drbrain@...7.net>
Somehow the rb_fd_init macro is conflicting with the definition of
Hi,
Hi,
[#5188] Re: IO#read — Yukihiro Matsumoto <matz@...>
Hi,
[#5190] Resolv and TTL — Eric Hodel <drbrain@...7.net>
I would like to retrieve the TTL values from Resolv, but they seem to
[#5206] Object#inspect() doesn't return; uses 100% cpu — Andrew Walrond <andrew@...>
Is this something I could have caused by overriding some method on the
[#5211] ruby 1.8 CVS do not work with --enable-pthread configure option — noreply@...
Bugs item #2038, was opened at 2005-06-16 13:57
[#5215] Hackers Guide Translation Request! — "Charles E. Thornton" <ruby-core@...>
I have recently discovered RUBY and want to understand it a deep level -
[#5219] Segmentation fault in timeout.rb — Michel Pastor <K@...>
Hi,
On Fri, 17 Jun 2005 05:03:18 +0900
Hi,
On Fri, 17 Jun 2005 11:51:07 +0900
Hi,
On Sat, 18 Jun 2005 10:28:53 +0900
Hi,
On Sun, 19 Jun 2005 23:05:56 +0900
[#5233] event_hook shows weirdness when invoked on mixed in methods — Ryan Davis <ryand-ruby@...>
The following attachment, when run, shows the following behavior:
[#5264] XMLRPC vulnerabilities? — Hugh Sasse <hgs@...>
I've just seen this (by RSS)
[#5267] RubyUnit Test Ordering — Jordan Gilliland <jordan@...>
I'm using ruby 1.8.2 (2004-12-25) [i686-linux] and I've noticed that the
[#5277] Macros in win32.h — james@...
win32.h defines a load of macros. This means any C or C++ program which embeds
[#5288] committing rdoc additions corrections to head? — Ryan Davis <ryand-ruby@...>
There is some discussion on ruby-doc about people documenting core
[#5296] Subversion — Shugo Maeda <shugo@...>
Hi,
Shugo Maeda wrote:
Curt Hibbs wrote:
On 6/30/05, Nikolai Weibull
Austin Ziegler wrote:
On 6/30/05, Nikolai Weibull
Austin Ziegler wrote:
On 6/30/05, mathew <meta@pobox.com> wrote:
Austin Ziegler wrote:
On 7/1/05, mathew <meta@pobox.com> wrote:
Austin Ziegler wrote:
On 7/1/05, Nikolai Weibull
Austin Ziegler wrote:
On 7/1/05, mathew <meta@pobox.com> wrote:
Austin Ziegler wrote:
On Thursday 30 June 2005 19:19, mathew wrote:
"Sean E. Russell" <ser@germane-software.com> writes:
On 30 Jun 2005, at 08:19, Shugo Maeda wrote:
Hi,
[PATCH] Resolv and TTL
I would like to retrieve the TTL values from Resolv, but they seem to
get thrown away long before they're near the public API, and digging
through the guts of Resolv::DNS would only result in much duplicate
code.
The following patch adds #ttl to Resolv::DNS::Resource. I also
changed #== and #hash because the TTL changes every time a new
resource is requested.
--
Eric Hodel - drbrain@segment7.net - http://segment7.net
FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04
Index: lib/resolv.rb
===================================================================
RCS file: /src/ruby/lib/resolv.rb,v
retrieving revision 1.29
diff -u -r1.29 resolv.rb
--- lib/resolv.rb 9 Jun 2005 22:47:35 -0000 1.29
+++ lib/resolv.rb 10 Jun 2005 08:57:09 -0000
@@ -1406,7 +1406,10 @@
name = self.get_name
type, klass, ttl = self.get_unpack('nnN')
typeclass = Resource.get_class(type, klass)
- return name, ttl, self.get_length16 {typeclass.decode_rdata
(self)}
+ res = self.get_length16 { typeclass.decode_rdata self }
+ res.instance_variable_set :@ttl, ttl
+
+ return name, ttl, res
end
end
end
@@ -1429,6 +1432,11 @@
class Resource < Query
+ ##
+ # Remaining Time To Live for this Resource.
+
+ attr_reader :ttl
+
ClassHash = {} # :nodoc:
def encode_rdata(msg) # :nodoc:
@@ -1440,10 +1448,13 @@
end
def ==(other) # :nodoc:
- return self.class == other.class &&
- self.instance_variables == other.instance_variables &&
- self.instance_variables.collect {|name| self.instance_eval
name} ==
- other.instance_variables.collect {|name|
other.instance_eval name}
+ return false unless self.class == other.class
+ s_ivars = self.instance_variables.reject { |name| name ==
"@ttl" }
+ o_ivars = other.instance_variables.reject { |name| name ==
"@ttl" }
+
+ return s_ivars == o_ivars &&
+ s_ivars.collect {|name| self.instance_eval name} ==
+ o_ivars.collect {|name| other.instance_eval name}
end
def eql?(other) # :nodoc:
@@ -1452,7 +1463,7 @@
def hash # :nodoc:
h = 0
- self.instance_variables.each {|name|
+ self.instance_variables.reject { |name| name ==
"@ttl" }.each {|name|
h ^= self.instance_eval("#{name}.hash")
}
return h