44025-44713 subjects 44543-46428

Announce: Pike Conference 2002
44337 [jhs@pi e. da] Call for Participation and Contributions

Resolve DNS MX host entry.
44339 [lists@ne ro ] How do i do it in Ruby?
44341 [Dave@Pr gm t] res = Resolv::DNS.new.getresources(host, Resolv::DNS::Resource::IN::MX)
44344 [lists@ne ro ] Ahhh, thanx! I am just in the first day of learning Ruby.

Perl like "strict"?
44347 [bobx@li ux a] Is there a way to make sure variables are declared before use OR is does
44352 [dblack@ca dl] It's rather different, as between Ruby and Perl.  There's an

44353 [bobx@li ux a] Has anyone hacked together a menu addition for Ruby? This would include
44492 [piman@sa re ] at?

does ruby 1.6 include tcltklib
44354 [mxiao@ee ua ] I find the ruby in my machine lack of tcltklib, does ruby 1.6 include it? or

does ruby 1.6 include tcltklib?
44357 [mxiao@ee ua ] I find the ruby in my machine lack of tcltklib, does ruby 1.6 include it? or
44362 [transami@tr ] oops, sorry maggie, didn't head my email or anything and to top it off i

first code ligne
44371 [mona.benbrah] ...

Destructors in Ruby
44372 [rubytalk@bo ] class Foo
+ 44374 [nat.pryce@b1] Cheers,
| 44386 [ruby-talk@je] and http://www.rubygarden.org/ruby?GCAndMemoryManagement (near bottom)
+ 44375 [pbrengard@bc] what about using Mutex ?
  44376 [rubytalk@bo ] How can I solve it using mutex?

when will the next stable version available
44381 [kgergely@ml ] I'm just curious how quick is the ruby developement process, so when

mod_ruby vs. mod_perl?
44383 [hal9000@hy e] I'm wondering how mod_ruby stacks up
44393 [mike@st k. o] If mod_ruby just does what the "What's mod_ruby?" section of

Need mailing list help
44384 [jos@ca no k.] ruby-talk mailing list but for some reason I stopped receiving mail from the
44412 [matz@ru y- a] <jos@catnook.com> is still registered.  I guess something wrong in

Dynamic Methods
44387 [nojgoalbyspa] I wonder if anyone has any suggestions on how to create a method that
+ 44388 [Dave@Pr gm t] class Dave
| 44402 [nojgoalbyspa] Wow!  Thanks Dave!
| + 44404 [dblack@ca dl] one defines the box....
| | 44406 [Dave@Pr gm t] With Ruby (to misquote some movie or other) there is no box.
| + 44408 [michael_s_ca] I can't say I've ever needed anything like this.  It seems mightily
|   44415 [nojgoalbyspa] Maybe to call ALL of the methods? ;-)
|   + 44441 [michael_s_ca] it might be possible, but damned difficult.
|   | 44456 [nojgoalbyspa] I assume you mean having the class respond to methods that match a regexp?
|   | + 44459 [dossy@pa op ] So, implement #method_missing that delegates to the actual method name
|   | | 44462 [nojgoalbyspa] regexp?
|   | + 44460 [dblack@ca dl] For aliasing, you can use, ummmm, alias :-)
|   |   + 44461 [dossy@pa op ] class Foo
|   |   + 44463 [nojgoalbyspa] regexp?
|   + 44442 [dblack@ca dl] Or raise TooManyMethodsError :-)
|     44455 [nojgoalbyspa] Basically I thought it was nigh impossible too.  But you never know in this
|     44466 [michael_s_ca] I'm still curious as to why you think you need this feature, however implemented.
|     + 44467 [michael_s_ca] Ah, sorry, I asked this before I saw your next post which answered
|     + 44468 [hal9000@hy e] implemented.
|       44471 [Dave@Pr gm t] Of course, relying on Ruby's dispatching to parse commands, he might
|       44472 [nojgoalbyspa] I actually have a unique prefix for all of the commands I add dynamically.
+ 44389 [hal9000@hy e] Not sure *exactly* what you want... the method name gets passed
+ 44392 [transami@tr ] def method_missing(name, *args)
+ 44394 [transami@tr ] instersting. with something like this, if the method_missing routine was
  44396 [huber@al m. ] This reminds me of a bash feature which lets you mistype a directory
  44401 [nojgoalbyspa] LOL
  44662 [list@ch om t] Pass input handling like this over to libreadline.  You'll have
  44696 [nojgoalbyspa] I have never heard of libreadline before. I did a quick search and was
  44815 [list@ch om t] Ah!  I see.  Yes, in Debian it's just a matter of getting the libreadline-ruby

ruby dbi - problem with select_one()
44390 [carl@_n sp m] select_one function.  Could someone please tell me what I'm doing wrong?
44506 [uu9r@rz un -] select_one returns only one row object and is not callable with block.

New Visual Basic Profiler for $99 plus ActiveOptimizer 2.1 Release Announcement
44391 [sales@pl tf ] ...

cache dbi for web app
44395 [transami@tr ] okay, so i didn't completely trash my web app, i'm going to create both
+ 44397 [huber@al m. ] Perhaps putting the functionality into a daemon, and having the web
+ 44398 [alan@di ik t] I've never used it but I've had http://www.firstworks.com/sqlrelay.html in
+ 44400 [Dave@Pr gm t] Switching to mod_ruby would help a lot, both removing the interpreter
| 44410 [transami@tr ] hey dave,
| + 44411 [chris.morris] How would this work for multiple, simultaneous web sessions? Is the same
| | 44419 [Dave@Pr gm t] mod_ruby is executed by Apache, with each mod_ruby executing in its
| | 44602 [transami@tr ] a little more on persisting a database connection with mod_ruby --
| | 44699 [domingo@da -] Here is my experience using mod_ruby and making a persistent connexion.
| | 44719 [Dave@Pr gm t] I'm new to all this mod_ruby stuff, so bear with me.
| + 44418 [Dave@Pr gm t] it all gets loaded once and then stays there, getting invoked each
+ 44423 [ruby-talk@je] ...

How do I delegate continuations?
44403 [patrick-may@] def method_missing( symbol, *args )
+ 44405 [Dave@Pr gm t] Try
+ 44407 [ned@bi e- om] class A
+ 44444 [patrick-may@] Thanks Dave and Ned!  I will see how these suggestions play out in my codebase.

Socket problems on FreeBSD
44409 [bcox@vi tu l] Sorry to trouble you all but I'm really stumped on this one. Could
+ 44414 [alan@di ik t] Have you checked if you can access on the BSD box? IIRC for
| 44416 [bcox@vi tu l] Just spoke to Interland tech support. Turned out he's learning ruby
| + 44420 [Dave@Pr gm t] Does it have strace or truss, so you can see exactly what parameters
| | 44436 [bcox@vi tu l] Tried strace earlier but its not there. Never heard of truss before,
| | 44438 [decoux@mo lo] No, they are not missing
| | 44440 [bcox@vi tu l] Thanks, guys! The hints got me on the right track, although the
| + 44426 [gotoken@no w] Though I have no idea about Interland Freedom 400, loopback addresses
|   44437 [bcox@vi tu l] bash-2.04$ ps -p 1
+ 44417 [kjana@dm la ] Hmm....  Not a solution but just for your information, I got following
  44435 [bcox@vi tu l] Thanks. See below for comparables...

Problem using Basic Auth in WebUnit
44421 [Peter.Booth@] ...

help with named pipes
44422 [greg@mo nw n] I am having some trouble using named pipes in ruby, as illustrated

gsub() replacement containing replaced text
44424 [harryo@zi .c] This feels like a terribly newbie question to be asking, but I'm stymied ...
+ 44427 [vjoel@PA H. ] irb(main):001:0> "foo'bar".gsub("'", "\\'")
+ 44428 [timsuth@ih g] This issue is mentioned in 'Programming Ruby', "Standard Types" chapter (see
| 44431 [harryo@zi .c] As I said, I figured it was a bit of a newbie question :-).  I read PR chapter
+ 44432 [matz@ru y- a] "\\'" in a replacement string is substitute by the value of $', so you
  44457 [nojgoalbyspa] Would it make sense to add this to the Ruby FAQ?
  44458 [nojgoalbyspa] OK, I just found the wiki page where you can make suggestions for the FAQ, I

hey! where's #count?
44425 [transami@tr ] i went to count the number of equal objects in an array and discoverd
+ 44434 [moonwolf@mo ] use Enumerable#select
| 44439 [transami@tr ] indeed, i used select. i was just sort of surprised that #count wasn't
+ 44470 [ptkwt@sh ll ] I needed this same functionality the other day and ended up writing a
+ 44507 [chr_news@gm ] I guess I would write #count (not sure if this is such a descriptive
  + 44508 [decoux@mo lo] Do you expect this ?
  | 44514 [chr_news@gm ] Yes  (I actually tested my snippet on a Hash example
  + 44511 [transami@tr ] the String definition of count is different from what you have here. in
    44515 [chr_news@gm ] Aha, I see what you mean
    44516 [meier@me st ] Considering Enumerables like Set or Hash as a degenerated Enumerable I
    44517 [crippel@pr m] into

Ruby-Cookbook: Anybody downloaded it?
44430 [axel.friedri] I miss the ruby cookbook from rubycookbook.org. Anybody downloaded it
44443 [Dave@Pr gm t] I'd happily host it here on the RubyGarden site for a while.

.rb files in WIndows
44445 [hal9000@hy e] Here's a question for you.
+ 44448 [skywizard@ti] It's possible with NT cmd.exe, not Win9x DOS Prompt
| + 44450 [michael_s_ca] I've never heard of such a mechanism, but if you find out, let the
| + 44452 [bdelmee@ad a] I think you're right; I don't know about XP, though.
|   + 44453 [skywizard@ti] Sure, Xp inherited from NT and 'NT cmd.exe' tightly integrated
|   | 44464 [hal9000@hy e] Apparently correct. I can't do this on Win98 as I
|   | 44465 [Ephaeton@gm ] I was just hit by what I would call a spark of inspiration.
|   + 44454 [bdelmee@ad a] If you add '.rb' to the PATHEXT environment variable
+ 44510 [danny@fr uk ] Here's half a solution: write foo.bat with "ruby foo.rb" in it. Type foo
+ 45021 [gordonhartle] I don't know whether you're using cygwin / bash, but if you are,

DBI create table question
44446 [jim@fr ez .o] I am looking at Ruby DBI today for the first time.
+ 44449 [dossy@pa op ] You can only execute ONE SQL statement at a time via DBI.
| 44451 [jim@fr ez .o] Thanks
+ 44484 [khaines@en g] Neither.  The semicolon at the end of your statement is the problem.

Re: Commercial Support for Ruby(Windows support)
44469 [ptkwt@sh ll ] Yeah, Vancouver is great and plenty cosomopolitan for my taste...
44473 [oblomov@fr e] Easy installation which works "out of the box", system integration
+ 44474 [tobiasreif@p] Did you have any problems with Andy's installer?
| 44479 [oblomov@fr e] No, I didn't know it existed :(
| + 44480 [oblomov@fr e] Ok I got it. Call me stupid or blind :(
| + 44483 [nojgoalbyspa] Snip!
|   44486 [oblomov@fr e] Oh, thanks :)
+ 44475 [Dave@Pr gm t] Could you elaborate some more, so we can work on these features. In
  44478 [oblomov@fr e] Hey hey hey wait a second. Installer? Which installer? Oops! I didn't
  44557 [oblomov@fr e] Ok, I got the installer and now I have Ruby (1.6.6) finally on my
  + 44564 [list@ch om t] No, but it has rpkg.
  | 44565 [oblomov@fr e] Grazie :D
  + 44672 [llothar@we .] But .chm is searchable !
    44679 [oblomov@fr e] You got a point there (ok, I use standard search tools to search HTML
    44689 [Dave@Pr gm t] Can you generate .hlp from xml/html?
    44705 [bjsp123@ya o] tools to search HTML
    44743 [oblomov@fr e] I would prefer, instead. It's also much faster to load.

IO.pipe trick ?
44476 [gilles.filip] I need someone shed some light on the following problem.
44499 [phasis@ko ne] It's probably beause pipe's buffer size is 8192 bytes
44503 [gilles.filip] Yes, it works. But it it far too slow. Moreover, I intend to use this
44521 [nobu.nokada@] ...

OSCON 2002 BOF Accepted
44477 [jerickson@ey] ...

44482 [nojgoalbyspa] def create
+ 44487 [dblack@ca dl] I believe that "self.instance_eval" is essentially the same as plain
| + 44489 [chr_news@gm ] I guess that is what they call hindsight?-) You overlooked that eval
| + 44498 [nojgoalbyspa] it
+ 44500 [avi@be a4 co] def create (&block)
| 44501 [nojgoalbyspa] Is this a 1.7 feature?  Is it going to be in 1.8?
| 44505 [decoux@mo lo] 1.6.2 feature, if I'm right.
| + 44519 [gotoken@no w] By the way, Module#define_method could not define a method which takes
| + 44523 [nojgoalbyspa] Yes, seems Module.define_method was a 1.6.2 feature.  I assumed it was not
|   44526 [hal9000@hy e] added
|   44545 [decoux@mo lo] Like said in [ruby-talk:44519], you can't (I think) give it a block.
+ 44502 [nojgoalbyspa] them
+ 44512 [qrczak@kn .o] I think it's equivalent to
  44513 [decoux@mo lo] Personnaly I think that #define_method is a *private* method :-)))

Stackless exception (RUnit?)
44485 [dcorbin@im e] I find that often I want to raise an exception, with an error message

Which C compiler required to build extensions for Ruby 1.6.6 Windows binary distribution?
44488 [pbooth@no oi] I'd like to install the RubyCurl extension into the Hunt/Thomas
44733 [lyle@us rs s] I think you'll need to use Visual C++ for this. You may be able to use

ALERT -  GroupShield ticket number OA12_1026621905_LEVIATHAN_1 wa s generated
44496 [NAIITACTICSL] The attachment was quarantined from the message and replaced with a text

Virus Alert
44497 [security@po ] ...

[OT] test
44504 [tobiasreif@p] test

mod_ruby and ERubyRun error
44509 [spari@ho ma ] I just installed mod_ruby with Apache and been trying to get it to run eruby
45141 [spari@ho ma ] Still haven't been able to get eruby working :(
45143 [transami@tr ] # Additions for mod_ruby

reasonable cgi session skeleton?
44518 [ontologist_2] I fear there might be a deep bug
44520 [airboss@no e] Jan,

How to delete a line in a file if....?
44524 [keuler@po ta] All-
44527 [lists@de on ] Is something like this what you mean? (I didn't debug this btw)
44541 [keuler@po ta] Thanks Daniel. This looks like it would work. But I had in mind to delete a line in an open file, then save the whole file, rather than do conditional saving line-by-line to an out file. Maybe these are really the same thing but just look different.
44542 [Dave@Pr gm t] Think of a file as simply a stream of characters on disk, with

Now to skip processing of first line in a file....and reading an  Excel file?
44525 [keuler@po ta] All-
44528 [jim@fr ez .o] Let's break this down. First, there are many ways to do what you want.
44567 [djberge@qw s] If you're feeling up to the task you could port the two related Perl
44569 [hal9000@hy e] an Excel file?

Halting Ruby's threading
44529 [mattbee@so p] Is there any Ruby program that has the capability to halt Ruby's thread
44538 [pbrannan@at ] 1) Set Thread.critical to true
44546 [mattbee@so p] Hmm, well, I was obliquely implying a bug since I'm not doing any of those

RE: hey! where's #count? (clearing up degeneration)
44530 [transami@tr ] ...
+ 44532 [dblack@ca dl] I don't get the "should" part....  Having #include? do something
| 44533 [transami@tr ] thanks david!
+ 44548 [decoux@mo lo] An Hash is ordered, this is just that the order is difficult to predict.
  44549 [transami@tr ] predict.
  44550 [decoux@mo lo] Well, try #each, #keys and #values and you'll see that the objects are
  + 44551 [transami@tr ] ts,
  | 44552 [decoux@mo lo] I use it in this case
  | 44553 [transami@tr ] what case? i'd like to see an example. i worry about depending on that.
  | 44554 [decoux@mo lo] [ruby-talk:12123]
  + 44566 [charleshixsn] Be careful with that assumption.  I believe that as a hash expands it
    44568 [decoux@mo lo] See [ruby-talk:44548] and [ruby-talk:12151], there is
    44570 [michael_s_ca] It's probably a semantic argument at this point and what is working

FXRuby and mkmf.rb
44531 [cjh_nospam@m] I'm trying to build FXRuby on Linux (Debian 2.4) with Ruby 1.6.7, and
44535 [cjh_nospam@m] Found it, sorry to bother you. Had to install "ruby-dev" Debian package.

Has anyone combined Test::Unit with CGI?
44534 [dossy@pa op ] Doing some Test::Unit work on my CGI scripts, I wondered if anyone
+ 44536 [jim@fr ez .o] I've heard of a webunit, but I have not had the chance
| + 44537 [dossy@pa op ] I'm not talking of combining them in that way.
| | 44539 [dossy@pa op ] If anyone is keen to try my changes out ...
| + 44544 [dsafari@pa a] I think webunit is a different beast - it is modeled tightly off httpunit
+ 44547 [patrick-may@] print "Content-type: text/html\r\n"
  44555 [dossy@pa op ] This is what the initial version of mine did.  Of course, <pre> isn't
  + 44563 [rob@to tu a.] What about using...
  + 44580 [drbrain@se m] Obsolete elements=20

Please confirm (conf#5d7474df7b5556e49a786864280c5693)
44540 [greg@de ti e] << IMPORTANT INFORMATION! >>