From: daz Date: 2004-06-11T14:53:37+09:00 Subject: Re: RUBY/dl bug ? Shashank Date wrote: > I was trying out the RUBY/DL samples which can be downloaded from: > http://ttsky.net/ruby/ruby-dl-sample/win32/ > and while trying out the stream.rb example, I got the following error on > Win XP (Home) using ruby one-click install: > -------------------------------------------------------------- > Microsoft Windows XP [Version 5.1.2600] > (C) Copyright 1985-2001 Microsoft Corp. > > C:\>cd downloads\_ruby > > C:\downloads\_ruby>ruby stream.rb stream.rb > c:/ruby/lib/ruby/1.8/dl/types.rb:73:in `pack': bignum out of range of > unsigned long (RangeError) > from c:/ruby/lib/ruby/1.8/dl/types.rb:73 Hi Shanko, I think it's a Ruby bug that was fixed. Fri Jan 23 02:26:30 2004 Yukihiro Matsumoto * pack.c (num2i32): pack should not raise RangeError. [ruby-dev:22654] As a work-around, try changing line 73 in dl/types.rb from: proc{|v| [v].pack("l").unpack("L")[0]}], to: proc{|v| [v & 0xffffffff].pack("l").unpack("L")[0]}], daz