[#2529] concerns about Proc,lambda,block — "David A. Black" <dblack@...>

Hi --

39 messages 2004/03/01
[#2531] Re: concerns about Proc,lambda,block — ts <decoux@...> 2004/03/01

>>>>> "D" == David A Black <dblack@wobblini.net> writes:

[#2533] Re: concerns about Proc,lambda,block — "David A. Black" <dblack@...> 2004/03/01

Hi --

[#2537] Re: concerns about Proc,lambda,block — matz@... (Yukihiro Matsumoto) 2004/03/01

Hi,

[#2542] Re: concerns about Proc,lambda,block — Mathieu Bouchard <matju@...> 2004/03/02

[#2545] Re: concerns about Proc,lambda,block — matz@... (Yukihiro Matsumoto) 2004/03/02

Hi,

[#2550] Re: concerns about Proc,lambda,block — Mauricio Fern疣dez <batsman.geo@...> 2004/03/03

On Wed, Mar 03, 2004 at 07:51:10AM +0900, Yukihiro Matsumoto wrote:

[#2703] Proposed patch to add SSL support to net/pop.rb — Daniel Hobe <daniel@...>

This patch adds support to Net::POP for doing POP over SSL. Modeled on how

19 messages 2004/03/27
[#2704] Re: Proposed patch to add SSL support to net/pop.rb — Daniel Hobe <daniel@...> 2004/03/27

This is v2 of the patch. Cleaned up a bit and added some more docs.

[#2707] Re: Proposed patch to add SSL support to net/pop.rb — Daniel Hobe <daniel@...> 2004/03/28

v3 of the patch:

[#2721] Re: Proposed patch to add SSL support to net/pop.rb — Minero Aoki <aamine@...> 2004/03/30

Hi,

Issue with rb_time_new()

From: Daniel Berger <djberge@...>
Date: 2004-03-31 00:03:57 UTC
List: ruby-core #2724
Ruby 1.8.1
Solaris 9 and FreeBSD 4.9

I've noticed that rb_time_new() doesn't like float values very well. 
Example:

/* timex.c */
#include "ruby.h"
#include <stdio.h>

static VALUE get_time_float(){
   return rb_time_new(1073250153.00003);
}

static VALUE get_time_integer(){
   return rb_time_new(1073250153);
}

void Init_timex(){
   VALUE cTimex = rb_define_class("Timex",rb_cObject);

   rb_define_method(cTimex,"get_time_float",get_time_float,0);
   rb_define_method(cTimex,"get_time_integer",get_time_integer,0);
}

# extconf.rb
require "mkmf"
create_makefile("timex");

# test.rb
$:.unshift Dir.pwd
require "timex"

t = Timex.new
p t.get_time_float   # -> Mon Dec 27 05:12:47 MST 2004
p t.get_time_integer # -> Sun Jan 04 14:02:33 MST 2004

The float value is off.  On FreeBSD 4.9 the float version returns "Mon
Nov 11 00:34:04 PST 1929"!

Is this a case of "don't do that"?  Should I be casting the value passed
to rb_time_new to ensure an integer value?  Or should
time_new_internal() in time.c be altered?

Just curious.

Regards,

Dan

In This Thread

Prev Next