[#39410] xmlrpc4r won't unmarshal — Liam Holman <liam.holman@...>
I've been trying to use Marshalling with xmlrpc1.7.9, ruby 1.6.6
[#39417] Auto-quoting simple hash keys? — "Berger, Daniel" <djberge@...>
Hi all,
In article <7DC1217518FCD311A08A0050DA78574003C6B464@iamspems04.interprise.com>
[#39420] Scope of Singleton Classes — "Jason Voegele" <jason@...>
I'm writing an object proxy that intercepts method calls with method_missing
[#39432] require and case — Martin Stannard <martin@...>
I've noticed this before, but in a different context:
[#39463] RE: require and case — "Berger, Daniel" <djberge@...>
> --- Erik Bagfors <erik@bagfors.nu> wrote:
>>>>> "B" == Berger, Daniel <djberge@qwest.com> writes:
I confirm this behavior. I stumbled on something similar on ruby 1.6.7
>>>>> "B" == Baptiste Lepilleur <gaiacrtn@free.fr> writes:
ts <decoux@moulon.inra.fr> writes:
Hi,
matz@ruby-lang.org (Yukihiro Matsumoto) writes:
[#39471] Ruby and Parrot — "Berger, Daniel" <djberge@...>
Is anyone attending the Parrot talk at OSCON this year? I'm really very
[#39480] RE: Ruby and Parrot — "Berger, Daniel" <djberge@...>
> -----Original Message-----
[#39485] New to Ruby's C API — Chris <chris@...>
I followed the examples in the online rubycentral.com/book
[#39492] Ruby on Port 23 without admin access — "Firestone, Mark - Technical Support" <mark.firestone@...>
I know this is the Ruby list, and not a linux list, but any hints on how to
[#39498] RE: Ruby on Port 23 without admin access — "Firestone, Mark - Technical Support" <mark.firestone@...>
Ok. Well, this is kind of a drag. I want the software to answer the telnet
[#39503] IDs of the reference — Peter Hickman <peter@...>
With the following code
[#39534] dynamically assigning instance variables — "Berger, Daniel" <djberge@...>
Hi all,
wconrad@yagni.com wrote in message news:<20020503220050.GA443@pluto>...
Hello,
>>>>> "J" == Jean-Hugues ROBERT <jean_hugues_robert@yahoo.com> writes:
[#39535] restricted execution — David Garamond <davegaramond@...>
python has rexec and perl similarly has the Safe module. how does one do
[#39542] Adding new method to Built-In class — hubert@... (Hubert Hung-Hsien Chang)
I have tried to add new method to built-in class without success.
[#39544] Are %q and %Q universal? — Chris Gehlker <gehlker@...>
Hi all,
Hi,
On 5/4/02 9:51 AM, "Yukihiro Matsumoto" <matz@ruby-lang.org> wrote:
[#39554] Powerpoint slides: Ruby for Perl Programmers — "Hal E. Fulton" <hal9000@...>
On April 17, I gave a talk to the Perlmongers in
* Hal E. Fulton (hal9000@hypermetrics.com) wrote:
[#39559] Practical Ruby 0.2.2 — "Baptiste Lepilleur" <gaiacrtn@...>
Hi everyone,
[#39584] REXML and streaming APIs — ser@... (Sean Russell)
Hello,
[#39585] Ruby vs. Java vs. Native trivia — ser@... (Sean Russell)
Hi,
[#39586] Taintedness inheritence — ser@... (Sean Russell)
I posted a message a while back about the tainted? trait of objects in
[#39589] line recall in irb on Linux — Al Koscielny <alko@...>
Up arrow recalls the previous line in the bash shell on Linux but in irb up
[#39618] Clarification requested on Object->Kernel relationship — "Rich Kilmer" <rich@...>
Whoever can answer this:
>>>>> "R" == Rich Kilmer <rich@infoether.com> writes:
> -----Original Message-----
>>>>> "R" == Rich Kilmer <rich@infoether.com> writes:
[#39625] RAA wrapper client (Alpha-1) — Holden Glova <dsafari@...>
-----BEGIN PGP SIGNED MESSAGE-----
[#39648] Iterators and index — David Corbin <dcorbin@...>
Please consider this fragment
[#39657] newbie Q: how to strip blank lines from file? — Stewart Midwinter <stewart@..._midwinter.ca>
Well, I've spent a few days reading about Ruby, and want to try my first
Hello --
[#39694] Embedding Ruby in C++ — "Radu M. Obad磚 <whizkid@...>
Hi,
On Tue, May 07, 2002 at 12:06:37AM +0900, Radu M. Obad? wrote:
* jared l. jennings (jjenning@stetson.edu) [020506 10:28]:
On Tue, May 07, 2002 at 12:30:20AM +0900, Rick Bradley wrote:
* jared l. jennings (jjenning@stetson.edu) [020506 12:46]:
[#39723] WWW.RUBYCONF.ORG — Christine Hall <return@...>
Christine Hall <return@trafficmagnet.net> writes:
* Dave Thomas (Dave@PragmaticProgrammer.com) [020506 15:58]:
On Tue, May 07, 2002 at 06:05:18AM +0900, Rick Bradley wrote:
Marko Schulz <in6x059@public.uni-hamburg.de> writes:
[#39738] tags for embedded ruby — bigredlinux@... (Dan Allen)
After reading endless xml books and watching all of these languages
[#39743] Interest in ruby photo-album indexing and thumbnailing? — Clifford Heath <cjh_nospam@...>
Having bought a digital camera for Xmas (CP995), I've written some Ruby
[#39778] ruby emacs mode question — Paul Brannan <pbrannan@...>
Though I much prefer vim, I am sometimes forced to use emacs when I do
[#39779] RegExp zero-width negative lookahead — Lars Christensen <larsch@...>
Hi,
[#39796] Result of I need your experience - classification and comparison of languages — yvan.radenac@... (Yvan Radenac)
Hi,
On 7/05/2002 19:36, "Yvan Radenac" <yvan.radenac@equant.com> wrote:
[#39809] 'Ultimate' FreeRIDE ? — "Euan Mee" <xlucid@...>
[Note: This is a post to the FreeRIDE developers mailing list, which I have
On Tue, 07 May 2002 20:52:06 GMT, "Euan Mee"
On Thu, May 09, 2002 at 07:19:14AM +0900, Lothar Scholz wrote:
Lothar Scholz wrote:
[#39821] non-alphabetic character in symbol — kwatch@... (kwatch)
Hi,
Hi,
Hi,
Hi,
Hello,
[#39841] Is the FXGIFCursor available on FXRuby ? — dmg@... (David Martinez)
I am trying to use the FXGIFCursor primitive, but I receive
[#39856] gets and eof? — Paul Brannan <pbrannan@...>
I have a program that reads input from a socket and displays output on
[#39867] Ruby in Mac OS X 10.2 — Chris Gehlker <gehlker@...>
I just heard that Apple has announced that ruby will be pre-installed in the
[#39868] Want application to read file or from pipe — Jim Freeze <jim@...>
Hi:
Jim Freeze graced us by uttering:
[#39882] print to cgi error log — Brian Wisti <brian@...>
Hi all,
[#39887] Thread#join doesn't accept a timeout? — Dossy <dossy@...>
Hi,
Dossy [mailto:dossy@panoptic.com] wrote:
On 2002.05.10, Nathaniel Talbott <nathaniel@talbott.ws> wrote:
Dossy [mailto:dossy@panoptic.com] wrote:
On 2002.05.10, Nathaniel Talbott <nathaniel@talbott.ws> wrote:
Dossy [mailto:dossy@panoptic.com] wrote:
* Dossy (dossy@panoptic.com) [020508 21:56]:
In article <1020923593.140092.18089.nullmailer@picachu.netlab.jp>,
At 16:39 09/05/2002 +0900, you wrote:
Hi,
On 2002.05.09, Jean-Hugues ROBERT <jean_hugues_robert@yahoo.com> wrote:
Hi,
[#39898] cgi params api — patrick-may@... (Patrick May)
One thing that I don't like is the way cgi forces you to treat every
patrick-may@monmouth.com (Patrick May) wrote in message news:<3b3ad3b4.0205091447.5b00ce98@posting.google.com>...
At 02:23 11/05/2002 +0900, you wrote:
On Sat, May 11, 2002 at 03:27:13AM +0900,
At 05:56 11/05/2002 +0900, you wrote:
Wakou Aoyama <wakou@fsinet.or.jp> wrote in message news:<20020511121152.GA29832%wakou@fsinet.or.jp>...
> > If you access reqs['key'], then you'll always get a non-array object.
On 2002.05.12, Sean Chittenden <sean@chittenden.org> wrote:
Hello --
Hi,
On 2002.05.12, David Alan Black <dblack@candle.superlink.net> wrote:
On Mon, May 13, 2002 at 01:37:40AM +0900,
On 2002.05.13, Wakou Aoyama <wakou@fsinet.or.jp> wrote:
Hello --
On 2002.05.13, David Alan Black <dblack@candle.superlink.net> wrote:
Hi --
On 2002.05.13, David Alan Black <dblack@candle.superlink.net> wrote:
Dossy <dossy@panoptic.com> writes:
On 2002.05.13, Dave Thomas <Dave@PragmaticProgrammer.com> wrote:
On Tue, May 14, 2002 at 12:59:37AM +0900,
On 2002.05.14, Wakou Aoyama <wakou@fsinet.or.jp> wrote:
Hi,
On 2002.05.14, Wakou Aoyama <wakou@fsinet.or.jp> wrote:
Hi,
Hi --
Dossy <dossy@panoptic.com> wrote in message news:<20020514172939.GL14145@panoptic.com>...
On 2002.05.15, Patrick May <patrick-may@monmouth.com> wrote:
Hello --
On 2002.05.15, David Alan Black <dblack@candle.superlink.net> wrote:
Hello --
On 2002.05.15, David Alan Black <dblack@candle.superlink.net> wrote:
> Right, and as I said, defining #[] to return [] instead of nil
[#39916] xemacs & mode-ruby.el, broken ? — Jean-Hugues ROBERT <jean_hugues_robert@...>
Hi,
At 21:02 09/05/2002 +0900, you wrote:
[#39920] Teknik Arab Sudan for great sex — amy <infoterkini@...>
Belajar Cara memasang pc sendiri dan Networking seperti cybercafe
[#39955] Practical Ruby 0.3.3 — "Baptiste Lepilleur" <gaiacrtn@...>
Hi everyone,
[#39977] timeout.rb problem — Nikodemus Siivola <tsiivola@...>
[#40004] Ruby Conference 2002: Call for Presenters — David Alan Black <dblack@...>
Ruby Conference 2002: Call for Presenters
David Alan Black <dblack@candle.superlink.net> writes:
hello,
On Sat, 11 May 2002, ccos wrote:
ccos wrote:
On 5/10/02 2:23 PM, "Irv Mullins" <irv.mullins@eudoramail.com> wrote:
>
[#40015] BUG! Platform independent? sockets and select — "Kontra, Gergely" <kgergely@...>
Hi!
On 2002.05.11, Kontra, Gergely <kgergely@mlabdial.hit.bme.hu> wrote:
>Can you provide a minimal amount of working source that demonstrates
On 2002.05.11, Kontra, Gergely <kgergely@mlabdial.hit.bme.hu> wrote:
[#40016] Unicode in Ruby's Future? — Chris Gehlker <gehlker@...>
I was reading through "The Ruby Way" and noticed the sentence: "Because Ruby
Hi,
[#40053] methods disappearing in ruby-mysql-2.4.2a — Brad Hilton <bhilton@...>
Hello,
[#40055] ANNOUNCE: PageTemplate 0.1.0 — Brian Wisti <brian@...>
Hi all,
On Sat, 11 May 2002, Brian Wisti wrote:
> Congrats! Funny things, I was just working with HTML::Template today and
[#40079] emacs, inf-ruby, run-load-file removing \ filesep on Windows ? — Jean-Hugues ROBERT <jean_hugues_robert@...>
Hello,
Hi,
Hello,
Hi,
[#40092] Ruby extensions - pushing classes into other modules — Daniel Berger <djberg96@...>
Hi all,
[#40099] OT:is software eng an art? — ptkwt@...1.aracnet.com (Phil Tomson)
I signed up for a free seminar that's being held at a grad school nearby
Phil Tomson wrote:
----- Original Message -----
> From: Hal E. Fulton [mailto:hal9000@hypermetrics.com]
"Dossy" <dossy@panoptic.com> wrote in message
On 2002.05.14, Steve Merrick <Steve.Merrick@anti-spam.Marconi.com> wrote:
[#40105] Re: OT:is software eng an art? — "Radu M. Obad磚 <whizkid@...>
Mind me... but I feel like stating my oppinions regarding this issue. I
Martin Weber wrote:
[#40149] code coverage tool? — Thomas Søndergaard <tsondergaard@...>
I have a ruby module with about 1100 lines of code and another 1700 of unit tests. This gives me good confidence, but I would really like to know how much of the code is covered by tests.
[#40168] Ruby Lint — Dennis Newbold <dennisn@...>
One of the things that I really like about Ruby is that it doesn't
[#40180] What is Ruby for? — "Steve Merrick" <Steve.Merrick@...>
Or even 'Why <insert scripting language of your choice>'? I know it's me
Steve Merrick wrote:
Sean O'Dell wrote:
[#40199] Inline editing (non-command line) — "Berger, Daniel" <djberge@...>
Hi all,
[#40219] RE: Inline editing (non-command line) — "Berger, Daniel" <djberge@...>
[#40223] Tk callback with parameters — "Kontra, Gergely" <kgergely@...>
Hello!
[#40259] LocalJumpError caused by nesting plus END plus require — Joel VanderWerf <vjoel@...>
[#40293] Should we do something about newline? — Chris Gehlker <gehlker@...>
I just discovered that my copy of Ruby is picky about what constitutes a
[#40308] trying to fix ruby-gtk's menu.popup — mips <mips@...>
Hi guys,
[#40346] ANN: REXML 2.3.3 — Sean Russell <ser@...>
Getting tired of the upgrades yet?
<posted & mailed>
I'll weigh in here...
Hi --
On 5/15/02 12:53 PM, "David Alan Black" <dblack@candle.superlink.net> wrote:
Bob Hutchison schrieb:
On 5/15/02 4:28 PM, "Tobias Reif" <tobiasreif@pinkjuice.com> wrote:
Bob Hutchison wrote:
On 16 May 2002, Tobias Reif wrote (more or less):
On 5/19/02 7:58 PM, "Euan Mee" <xlucid@users.sourceforge.net> wrote:
[#40370] More embedding fun! — Jeff Ward <wardja@...>
I have another question that relates to embedding. I've got a few
[#40392] RE: Ruby Conference idea — "Berger, Daniel" <djberge@...>
Well, that went over like a lead balloon. Back to the drawing (poster?)
[#40397] ANN: Programmierung in Ruby — juergen.katins@... (Juergen Katins)
The translation of *Programming Ruby* by Dave Thomas and Andy Hunt is
Kent Dahl <kentda@stud.ntnu.no> wrote in message news:<3CE2CA05.E553A3B0@stud.ntnu.no>...
[#40409] ANNOUNCE: FXRuby-1.0.10 Now Available — "Lyle Johnson" <jlj@...>
I am pleased to announce the latest release of FXRuby, the Ruby language
Lyle,
[#40421] How to Convert Regex Back to String in Exact Match? — William Djaja Tjokroaminata <billtj@...>
Hi,
[#40445] random module? — Bob X <bobx@...>
Python has a whrandom or something like that and I would like to create
[#40449] Thread, stacktraces, errors and expect. — John Carter <john.carter@...>
I'm busy rewriting expect.rb to handle things in bigger chunks. I'm
[#40458] The various UnitTest frameworks. — John Carter <john.carter@...>
Looking in RAA I see three UnitTest frameworks...
[#40503] Test::Unit Installation difficulty — Bob Hutchison <hutch@...>
[#40520] Ruby/Qt — "Sean O'Dell" <sean@...>
Is anyone using it? How is it working out for you?
[#40521] user management...unix...via ssh? — Todd Holloway <todd@...>
[#40525] Metaclasses... — "Hal E. Fulton" <hal9000@...>
Hello, all...
----- Original Message -----
[#40542] The FXBook project at SourceForge -- an attempt to author books on FXRuby and the FOX Toolkit. — Dossy <dossy@...>
Everyone,
[#40544] ANN: Xml Serialization 1.0.pre3 — "Chris Morris" <home@...>
(partial Readme follows -- see web site for full information)
[#40559] what's the calling method name? — Yohanes Santoso <ruby-talk@...>
Hello all,
On Fri, 17 May 2002, Yohanes Santoso wrote:
John Carter <john.carter@tait.co.nz> writes:
Yohanes Santoso <ruby-talk@jenny-gnome.dyndns.org> writes:
On Sat, May 18, 2002 at 06:16:29PM +0900, Yohanes Santoso wrote:
wconrad@yagni.com writes:
Hi,
Hi,
Hi,
Hi,
Hi,
Hi,
Hi,
Hi,
[#40560] 10000 images windows shell scripting — Henning von Rosen <henning@...>
How do I accomplish the simple invocation from a ruby script of a program
On Fri, 17 May 2002, Henning von Rosen wrote:
[#40571] Shifting array element & regex on array element — Yohanes Santoso <freeride-devel@...>
In implementing a buffer gap mechanism, I was wondering if there is
-----BEGIN PGP SIGNED MESSAGE-----
Holden Glova <dsafari@xtra.co.nz> writes:
Azt irtad, hogy
-----BEGIN PGP SIGNED MESSAGE-----
[#40585] Greedy Regexp — Aidan <ahumphreys@...>
Are Ruby regular expressions, especially those built using the
[#40592] user-name query — Christian Szegedy <szegedy@...>
Hi!
[#40612] Exceptions and <=> — Paul Brannan <pbrannan@...>
I was playing with <=> recently, and I noticed that the following:
[#40635] Ruby regex question — Dossy <dossy@...>
Maybe this is Perl envy, maybe I'm just doing something wrong.
Dossy graced us by uttering:
In article <20020518152610.GJ9684@panoptic.com>, Dossy wrote:
On 2002.05.19, Mike Stok <mike@stok.co.uk> wrote:
Hi --
> Look on the bright side:
On 2002.05.19, Michael Campbell <michael_s_campbell@yahoo.com> wrote:
Dossy graced us by uttering:
[#40672] Best way to determine a VALUES Ruby type — Christian Rishoej <chrris@...>
[#40687] RubyEclipse released — "Adam Williams" <awilliams@...>
First release of the highly anticipated (maybe just by me) Ruby IDE. Get it
Adam Williams wrote:
Okay. So I probably need to work on some documentation.
Adam Williams wrote:
[#40700] Simple google search script — Charles Blackburn <charlesb@...>
Hi all.
On Sun, May 19, 2002 at 07:42:05PM +0900, Charles Blackburn wrote:
[#40723] are there unit tests for cgi.rb? — patrick-may@... (Patrick May)
if so, where could I find them?
Wakou Aoyama wrote:
On Tue, May 21, 2002 at 12:27:46AM +0900,
On Tue 21 May 2002 at 01:00:22 +0900, Wakou Aoyama wrote:
On Wed, May 22, 2002 at 06:09:37AM +0900, Ian Macdonald wrote:
Hello,
[#40724] mod_ruby or remove_cost question — patrick-may@... (Patrick May)
is there an easier to test way of checking for the mod_ruby enviroment
[#40729] Object <-> Relational mapping — Thomas Hurst <tom.hurst@...>
I'm getting very, very tired of writing code that looks like this:
[#40733] E — Chris Gehlker <gehlker@...>
Just saw a blurb on O'Rielly's site about E. Has anyone used it. It sounds a
[#40745] Need Multiline Regexp Help — Jim Freeze <jim@...>
Hi:
[#40760] Re: Simple google search script — Francis Hwang <sera@...>
Charles Blackburn wrote:
[#40761] Binary network protocols — Terje Elde <terje+ruby-talk@...>
Hi,
[#40778] automatic documentation: using tests in addition to / instead of comments — Tobias Reif <tobiasreif@...>
Hi,
Tobias Reif <tobiasreif@pinkjuice.com> writes:
On 5/20/02 9:04 AM, "Dave Thomas" <Dave@PragmaticProgrammer.com> wrote:
How do you get the auto_increment record number for mysql in
> How do you get the auto_increment record number for mysql in
Sean, sorry if I'm being obtuse, but this isn't working out.
Man, how did I miss this thread?
On Wed, May 22, 2002 at 12:14:05AM +0900, Sean Russell wrote:
Here's my two bits.
Upon reflection, I saw two points throughout this discussion:
On Mon, May 20, 2002 at 10:04:07PM +0900, Dave Thomas wrote:
[#40814] Zmodem Module ? — Dennis Newbold <dennisn@...>
Does anyone know of, or has written a Ruby extension implementing the
[#40875] Memory consumption. — Erik Terpstra <erik@...>
Is there some method that tells me how much memory a certain object
Yohanes Santoso wrote:
[#40890] Idea for a book — Peter Hickman <peter@...>
How about 'Design Patterns in Ruby' so those of us that went to Uni
[#40906] Segfault - [Bug]? — Mitch Vincent <mitch@...>
In a program I just wrote to grab several million rows from a PostgreSQL
[#40908] Rewrite this without using eval... — "Gray, Jeff" <jeff.gray@...>
I happened upon a situation where I wanted to apply a sequence of operations
[#40948] FAQ for newcomers familiar with lower level language — Yohanes Santoso <ruby-talk@...>
I have been on this list for about a year. I have noticed that many
[#40951] Overriding TCPServer.accept — Farrel Lifson <flifson@...>
Hi all,
[#40974] RE: rubycookbook.org down for indeterminate time — "Berger, Daniel" <djberge@...>
> -----Original Message-----
On Thu, 23 May 2002, Berger, Daniel wrote:
[#40978] Re: Stymied by Ruby's garbage collector — Art Taylor <ataylor@...>
Is there a particular kind or kinds of object being created in huge numbers?
On 5/22/02 4:07 PM, "Art Taylor" <ataylor@fortpoint.com> wrote:
Matthew Bloch <mattbee@soup-kitchen.net> wrote in message news:<acidug$bj0$1@paris.btinternet.com>...
From: "Sean O'Dell" <sean@BUHBYESPAMcelsoft.com>
i am using Ruby 1.6.6 win pragprog distro
[#40979] possible bug: stack dump with <<-String, #{...} and large loops — patrick-may@... (Patrick May)
I had (poorly) coded a #{} with a large loop, i.e.
matz@ruby-lang.org (Yukihiro Matsumoto) wrote in message news:<1022138252.066533.4164.nullmailer@picachu.netlab.jp>...
Hi,
[#40987] confused about access control — Ian Macdonald <ian@...>
Hi,
On Thu, May 23, 2002 at 08:43:09AM +0900, Ian Macdonald wrote:
> On Thu, May 23, 2002 at 08:43:09AM +0900, Ian Macdonald wrote:
On 2002.05.23, Mike Campbell <michael_s_campbell@yahoo.com> wrote:
> Stop saying "call" and instead say "send a message" because that's
[#40991] dbi pg_dbd performance — Alan Chen <alan@...>
Has anybody else found that the ruby dbi + pg_dbd performance to be slow?
[#41008] Help: Ap fails for 1.7.2 — Bil Kleb <W.L.Kleb@...>
On several occuassions over the last few months, I've tried to run our application
[#41009] Threading oddness — Matthew Bloch <mattbee@...>
Consider this fragment:
[#41014] thread-safe socket? — "Kontra, Gergely" <kgergely@...>
Hi!
[#41036] require 'etc' — Todd Holloway <todd@...>
[#41055] cannot require 'postgres' from cgi — ahoward@... (ara howard)
i have a cgi program which works fine standalone and from a browser,
[#41057] Ruby in Redhat 7.3 — "Dat Nguyen" <thucdat@...>
Hi all,
[#41079] glade2ruby — Matthias Veit <matthias_veit@...>
[#41085] OS independent scripts, system calls on Windows and Linux — Tobias Reif <tobiasreif@...>
Hi,
nobu.nokada@softhome.net wrote:
[#41102] RE: OS independent scripts, system calls on Windows and Linux — "Morris, Chris" <chris.morris@...>
> All these incompatibility issues are why I want to talk about an RCR.
Morris, Chris wrote:
On Fri, 24 May 2002, Tobias Reif wrote:
> Dossy wrote:
On Wed, 29 May 2002, Tobias Reif wrote:
Hi,
[#41110] Anyone using NArray and 1.7.2? — Bil Kleb <W.L.Kleb@...>
While trying to port my application from 1.6.7 to 1.7.2, I've encountered some
[#41174] Unexpected Array#pack behaviour (bug?) — Han Holl <han@...>
[#41190] using test::unit for C++ unit tests — ptkwt@...1.aracnet.com (Phil Tomson)
I'm going to be starting on a C++ development project for a contract I'm
[#41192] Possible Bug in Ruby? — Florian Frank <flori@...>
[#41212] SizedQueue.new(0) — Lars Christensen <larsch@...>
On Mon, May 27, 2002 at 09:12:35PM +0900, Lars Christensen wrote:
On Mon, May 27, 2002 at 09:33:45PM +0900, Michael Neumann wrote:
[#41213] creating singleton class from C++ — Martin Man <Martin.Man@...>
hi all,
[#41244] A shutdown()? — Warden <wardja@...>
I'm just curious, and I've asked this before but I don't remember quite
[#41264] PR for ruby — John Knight <john@...>
malug is discussing the following question.
[#41296] Idioms — "Stephan J. Schmidt" <stephan.schmidt@...>
hi,
[#41320] ld errors attempting to install FXRuby on Solaris 8 — "Berger, Daniel" <djberge@...>
Hi all,
[#41326] object-name = content of a variable (migration from perl) — Marc Rene Arns <linux@...>
Hi to all,
I'm not sure if you got me right. The dynamically changing array-names
[#41327] is this a bug or is it behavior of which I am not aware? — patrick-may@... (Patrick May)
using prag programmers distro:
[#41343] mod_ruby not executing scripts — "Sean O'Dell" <sean@...>
I'm just trying out mod_ruby for the first time. It compiled and
[#41352] Infinity (?!) — ptkwt@...1.aracnet.com (Phil Tomson)
I didn't know there was an Infinity value in Ruby, just found it today:
On 2002.05.30, Phil Tomson <ptkwt@shell1.aracnet.com> wrote:
[#41402] Ruby, XML schema( RELAX NG) and a Q&D parser — <bbense+comp.lang.ruby.May.30.02@...>
-----BEGIN PGP SIGNED MESSAGE-----
[#41408] Ruby and HTML — "Sean O'Dell" <sean@...>
I've read up on a lot of the older discussions regarding using Ruby for
[#41419] Strange Ruby Regexp bug — Sean Russell <ser@...>
This is really bizarre, but it isn't the first time I've seen it. It is
[#41430] unicode <=> ascii encoding conversion — Tomas Brixi <tomas_brixi@...>
Hello,
[#41434] Ruby jobs — Tobias Reif <tobiasreif@...>
Hi,
>
james@rubyxml.com wrote:
[#41437] changing current directory — MENON Jean-Francois <Jean-Francois.MENON@...>
hello,
[#41446] RE: Thread safe array — "Morris, Chris" <chris.morris@...>
> It depend what you call a hole. What do you expect with ?
[#41447] "system" and Windows — MENON Jean-Francois <Jean-Francois.MENON@...>
hello again,
[#41457] Array Uniq — "Stephan J. Schmidt" <stephan.schmidt@...>
Hi,
[#41502] Trouble attempting to run tk under windows — "Victor Manuel Reyes Viloria" <vmreyes@...>
More Info:
[#41510] Finding all applications — Chris Gehlker <gehlker@...>
In trying to add drag and drop scripting to RubyStudio and the first task is
Jim Menard wrote:
Hi,
On 6/1/02 11:33 AM, "nobu.nokada@softhome.net" <nobu.nokada@softhome.net>
>> ruby -r find -e 'Find.find("/"){|f| puts f if f[/\.app$/]}'
On 6/1/02 5:20 PM, "Mike Campbell" <michael_s_campbell@yahoo.com> wrote:
On 2002.06.02, Chris Gehlker <gehlker@fastq.com> wrote:
On 6/1/02 7:44 PM, "Dossy" <dossy@panoptic.com> wrote:
* Chris Gehlker (gehlker@fastq.com) [020601 23:56]:
Chris Gehlker wrote:
Re: NNTP library for Ruby?
nosuzuki@postcard.st (Norio Suzuki) writes: > Hi Usano! > > > From: Usano <usano@nospam.earthlink.net> > > Date: Tue, 7 May 2002 04:34:24 +0900 > >> Message-ID: <v24ddu8fmum09qc2i6bia4o7ugluv7v5uu@4ax.com> > > > Is it easy to use Ruby to access Usenet? > > There is one library to access NNTP server on the RAA. Have you tried > this? http://www.ruby-lang.org/en/raa-list.rhtml?name=net%2Fnntp > > I am not using this but it looks easy to use. Please try it. I evaluated that package before, but it _WAS_ (6 months ago): 1. not very ruby-ish 2. somewhat slower than the other nntp package at http://www02.so-net.ne.jp/~greentea/ruby/nntp/. In the end I used the one from greentea. I made a few modification both for performance and protocol update reasons: faster, simpler line get, and auth and xover supports. The documentation of the package is admitedly lacking, but that was not a significant problem. Here is my patch for the package if you decide to use it: Hope this helps. YS.
Attachments (1)
diff -Naur ruby-nntp.orig/nntp.rb ruby-nntp/nntp.rb
--- ruby-nntp.orig/nntp.rb Tue May 7 08:58:37 2002
+++ ruby-nntp/nntp.rb Tue May 7 09:13:00 2002
@@ -1,9 +1,10 @@
-# $Id: nntp.rb,v 2.14 2000/02/26 17:28:53 rgt Exp $
+# $Id: ruby_nntp.rb,v 1.2 2001/12/23 14:53:44 ysantoso Exp $
-require 'nntp/nntp_h'
-require 'nntp/nntptime'
+#modified from http://www02.so-net.ne.jp/~greentea/ruby/nntp/
+
+require 'nntp_h'
+require 'nntptime'
require 'socket'
-require 'tsdreader'
module NNTP
class NNTPIO
@@ -17,9 +18,9 @@
#raise NNTPError (when error in NNTP) or StandardError (when error in methods
of TCPSocket)
=end
- def NNTPIO.session(host, port=WELL_KNOWN_PORT, &block)
+ def NNTPIO.session(host, port=WELL_KNOWN_PORT, user = nil, pass = nil, &block)
nntp = NNTPIO.new(host, port)
- nntp.connect
+ nntp.connect(user, pass)
begin
block.call nntp
ensure
@@ -27,6 +28,7 @@
end
end
+
def initialize(host, port=WELL_KNOWN_PORT)
## host.is_a? String and port.is_a? Integer
@host = host
@@ -35,6 +37,7 @@
@response = nil
@socket = nil
@postable = false
+ puts "inited"
end
attr_reader :response, :postable
@@ -43,20 +46,93 @@
#raise NNTPError (when error in NNTP) or StandardError (when error in methods
of TCPSocket)
=end
- def connect
+ def connect(user=nil, pass=nil)
+ puts "entring connect"
if not closed?
return
end
+ puts "host=#{@host}, port=#{@port}"
@socket = open_socket(@host, @port)
resp = get_response
if resp[0..2] == OK_READY
+ authenticate(user, pass) if user
return (@postable = true)
elsif resp[0..2] == OK_READY_NO_POST
+ authenticate(user, pass) if user
return (@postable = false)
else
raise NNTPError.new(resp)
end
end
+
+=begin
+ #added by YS (2001-Nov-24)
+ #raise NNTPError if fails
+=end
+ def authenticate(user, pass)
+ req = AUTHINFO_USER+" #{user}"
+ resp = send_command req
+ if resp[0..2] == PASS_REQUIRED
+ resp = send_command AUTHINFO_PASS+" #{pass}"
+ if resp[0..2] == OK_READY
+ return
+ end
+ else
+ raise NNTPError.new(resp)
+ end
+ end
+
+=begin
+ # added by YS (2001-Nov-25)
+ #raise NNTPError if fails
+=end
+ def mode_reader
+ resp = send_command MODE_READER
+ if resp[0..2] == OK_READY
+ return
+ else
+ raise NNTPError.new(resp)
+ end
+ end
+
+=begin
+ #added by YS (2001-Nov-25)
+ #raise NNTPError if fails
+ #similar to get_newgroups
+=end
+ def get_xover(artRange)
+ resp = send_command XOVER+" #{artRange.first}-#{artRange.last}"
+ if resp[0..2] != OK_OVERVIEW
+ raise NNTPError(resp)
+ end
+ while (line = @socket.gets(CRLF))
+ if eom? line
+ break
+ else
+ yield make_xover_info(line)
+ end
+ end
+ end
+
+=begin
+ # added by YS (2001 Nov 25)
+ # similar to make_group_info
+ #return [artnum, subject, author, date, msgId,
+ # references, bytes, lines, other junks that may or may not present]
+ #raise NNTPError (when error in NNTP) or StandardError (when error in methods
+ of TCPSocket)
+=end
+ def make_xover_info(line)
+ ## line.is_a? String
+ arry = line.chomp(CRLF).split("\t", 9)
+ if arry.size >= 8
+ return arry
+ else
+ return nil
+ end
+ end
+
+
=begin
#return boolean
@@ -65,6 +141,7 @@
@socket.nil? or @socket.closed?
end
+
=begin
#return TCPSocket
#raise StandardError when error in TCPSocket#new
@@ -91,7 +168,7 @@
if resp[0..2] != OK_ARTICLE
raise NNTPError.new(resp)
end
- while (line = TSDReader.read_line(@socket, TSDReader::BUFSIZ, CRLF))
+ while (line = @socket.gets(CRLF)) #TSDReader.read_line(@socket, TSDReader::BUFSIZ, CRLF))
if eom?(line)
break
else
@@ -119,7 +196,7 @@
if resp[0..2] != OK_BODY
raise NNTPError.new(resp)
end
- while (line = TSDReader.read_line(@socket, TSDReader::BUFSIZ, CRLF))
+ while (line = @socket.gets(CRLF)) #TSDReader.read_line(@socket, TSDReader::BUFSIZ, CRLF))
if eom?(line)
break
else
@@ -148,7 +225,7 @@
raise NNTPError.new(resp)
end
line = nil
- while (line = TSDReader.read_line(@socket, TSDReader::BUFSIZ, CRLF))
+ while (line = @socket.gets(CRLF)) #TSDReader.read_line(@socket, TSDReader::BUFSIZ, CRLF))
if eom?(line)
break
else
@@ -241,7 +318,7 @@
if resp[0..2] != INFO_HELP
raise NNTPError, resp
end
- while (line = TSDReader.read_line(@socket, TSDReader::BUFSIZ, CRLF))
+ while (line = @socket.gets(CRLF)) #TSDReader.read_line(@socket, TSDReader::BUFSIZ, CRLF))
if eom? line
break
else
@@ -269,12 +346,17 @@
#raise NNTPError (when error in NNTP) or StandardError (when error in methods
of TCPSocket)
=end
- def get_list(&block)
+ ## YS 2001-12-23: added option group_pattern.
+ def get_list(group_pattern = nil, &block)
## block != null
- if send_command(LIST)[0..2] != OK_LIST
+ req = LIST
+ if group_pattern
+ req += " active #{group_pattern}"
+ end
+ if send_command(req)[0..2] != OK_LIST
raise NNTPError, resp
end
- while (line = TSDReader.read_line(@socket, TSDReader::BUFSIZ, CRLF))
+ while (line = @socket.gets(CRLF)) #TSDReader.read_line(@socket, TSDReader::BUFSIZ, CRLF))
if eom? line
break
else
@@ -300,7 +382,7 @@
if (resp = send_command(req))[0..2] != OK_NEWGROUPS
raise NNTPError.new(resp)
end
- while (line = TSDReader.read_line(@socket, TSDReader::BUFSIZ, CRLF))
+ while (line = @socket.gets(CRLF)) #TSDReader.read_line(@socket, TSDReader::BUFSIZ, CRLF))
if eom? line
break
else
@@ -310,7 +392,7 @@
end
=begin
- #return [group_name, last_article_number, first_article_number, post_allowed]
+ #return [group_name, last_article_number, first_article_number, post_allowed]
#raise NNTPError (when error in NNTP) or StandardError (when error in methods
of TCPSocket)
=end
@@ -362,7 +444,7 @@
if resp[0..2] != OK_NEWNEWS
raise NNTPError.new(resp)
end
- while (line = TSDReader.read_line(@socket, TSDReader::BUFSIZ, CRLF))
+ while (line = @socket.gets(CRLF)) #TSDReader.read_line(@socket, TSDReader::BUFSIZ, CRLF))
if eom? line
break
else
@@ -496,7 +578,7 @@
of TCPSocket)
=end
def get_response
- resp = TSDReader.read_line(@socket, TSDReader::BUFSIZ, CRLF)
+ resp = @socket.gets(CRLF) #TSDReader.read_line(@socket, TSDReader::BUFSIZ, CRLF)
if resp[0] == ?5 or resp[0..2] == FAIL_SERVICE
raise NNTPError.new(resp)
@@ -507,5 +589,5 @@
class NNTPError < StandardError
end
-
+
end
diff -Naur ruby-nntp.orig/nntp_h.rb ruby-nntp/nntp_h.rb
--- ruby-nntp.orig/nntp_h.rb Tue May 7 08:58:52 2002
+++ ruby-nntp/nntp_h.rb Tue May 7 09:00:28 2002
@@ -15,7 +15,16 @@
POST = 'POST'.freeze
QUIT = 'QUIT'.freeze
SLAVE = 'SLAVE'.freeze
-
+
+ AUTHINFO_USER = 'AUTHINFO USER'.freeze
+ AUTHINFO_PASS = 'AUTHINFO PASS'.freeze
+ MODE_READER = 'MODE READER'.freeze
+ LIST_OVER = 'LIST OVERVIEW.FMT'.freeze
+ XOVER = 'XOVER'.freeze
+ OK_OVERVIEW = '224'.freeze # overview command succeed
+ OK_LISTOVER = '215'.freeze # list overview command succeed.
+
+
# NNTP responses
INFO_HELP = '100'.freeze # help text follows
INFO_DEBUG = '199'.freeze # debug output
@@ -35,6 +44,7 @@
OK_IHAVE = '235'.freeze # article transferred ok
OK_POST = '240'.freeze # article posted ok
+ PASS_REQUIRED = '381'.freeze # want to have pass.
SEND_IHAVE = '335'.freeze # send article to be transferred.
SEND_POST = '340'.freeze # send article to be posted.
@@ -54,6 +64,6 @@
NOT_RECOGNIZED = '500'.freeze # command not recognized
SYNTAX_ERROR = '501'.freeze # command syntax error
- PERMISSION_DENINED = '502'.freeze # access restriction or permission denied
+ PERMISSION_DENIED = '502'.freeze # access restriction or permission denied
FAULT = '503'.freeze # program fault - command not performed
end
diff -Naur ruby-nntp.orig/nntptime.rb ruby-nntp/nntptime.rb
--- ruby-nntp.orig/nntptime.rb Tue May 7 08:58:45 2002
+++ ruby-nntp/nntptime.rb Tue May 7 09:00:28 2002
@@ -1,12 +1,13 @@
module NNTP
module NNTPTime
=begin
+ ## modified by YS. Year should be a 4-digit string (new standard).
##pre time.is_a? Time or time.is_a? SlowTime
##post const time
##return Time#to_s
=end
def NNTPTime.time2str(time)
- time.dup.gmtime.strftime '%y%m%d %H%M%S GMT'
+ time.dup.gmtime.strftime '%Y%m%d %H%M%S GMT'
end
=begin
diff -Naur ruby-nntp.orig/test-nntp.rb ruby-nntp/test-nntp.rb
--- ruby-nntp.orig/test-nntp.rb Tue May 7 08:58:59 2002
+++ ruby-nntp/test-nntp.rb Tue May 7 09:11:22 2002
@@ -3,7 +3,8 @@
include NNTP
now = Time.now.gmtime
-yest = Time.at(now.to_i - 60 * 60 * 24)
+yest = Time.at(now.to_i - 60 * 60 * 24 * 30*12*10)
+puts yest
nntp = NNTPIO.new(ARGV[0])
@@ -27,10 +28,11 @@
puts 'done get_list'
=end
print 'distro: '
-dists = $stdin.gets.chomp.split
-if dists.empty?
- dists = nil
-end
+#dists = $stdin.gets.chomp.split
+#if dists.empty?
+# dists = nil
+#end
+dists=nil
# NEWGROUPS
puts 'do get_newgroups'
@@ -42,8 +44,9 @@
puts 'done get_newgroups'
# GROUP, NEWNEWS
-print 'group: '
-grp = $stdin.gets.chomp
+#print 'group: '
+#grp = $stdin.gets.chomp
+grp = nil
p nntp.set_group(grp)
puts 'done set_group'
@@ -56,8 +59,9 @@
end
puts 'done get_newnews'
-print 'article number: '
-an = $stdin.gets.chomp
+#print 'article number: '
+#an = $stdin.gets.chomp
+grp=nil
# STAT, LAST, NEXT
puts 'do set_stat, set_last, set_next'
diff -Naur ruby-nntp.orig/tsdreader.rb ruby-nntp/tsdreader.rb
--- ruby-nntp.orig/tsdreader.rb Tue May 7 08:59:05 2002
+++ ruby-nntp/tsdreader.rb Thu Jan 1 00:00:00 1970
@@ -1,60 +0,0 @@
-module TSDReader
- BUFSIZ = 8192
- TSD_COUNT = :_read_char_count
- TSD_BUFF = :_read_char_buff
-
- ## mostly private
- def TSDReader.read_char(io)
- str = result = nil
- if not Thread.current[TSD_COUNT] or
- Thread.current[TSD_COUNT] == 0
- begin
- str = io.sysread(BUFSIZ)
- rescue Errno::EINTR
- retry
- rescue EOFError
- if str.nil? or str.size == 0
- Thread.current[TSD_BUFF] = nil
- Thread.current[TSD_COUNT] = 0
- return -1
- end
- end
- Thread.current[TSD_BUFF] = str
- Thread.current[TSD_COUNT] = str.size
- end
- result = Thread.current[TSD_BUFF][Thread.current[TSD_BUFF].size -
- Thread.current[TSD_COUNT]]
- Thread.current[TSD_COUNT] -= 1
- result
- end
-
- ##pre io.is_a? IO and maxlen.is_a? Integer and rs.is_a? String
- def TSDReader.read_line(io, maxlen=BUFSIZ, rs=$/)
- line = ''
- for i in 1..maxlen
- c = read_char(io)
- if c < 0
- if line.size == 0
- return nil
- else
- break
- end
- end
- line << c.chr
- if line.index(rs, -(rs.size))
- break
- end
- end
- if i == maxlen and not line.index(rs, -(rs.size))
- raise IOError, 'too long line'
- end
- line
- end
-end
-
-if $0 == __FILE__
- io = File.open(ARGV[0])
- while (line = TSDReader.read_line(io, 1024))
- puts line
- end
-end