88968-93974 subjects 89340-90866

89160 [ralph.mason ] It's been a couple of years since I posted here so hello to old
89163 [hal9000 hype] - the RAA (raa.ruby-lang.org)
89169 [gsinclair so] org
89170 [hal9000 hype] Fortunately both of these seem to be redirects.

^ Dir.chdir '~'
89162 [vjoel PATH.B] Does anyone know why this happens?
89164 [theaney cabl] You must be starting out in a directory with a ~ subdirectory that
+ 89165 [markjreed ma] More to the point, I think is that Ruby doesn't expand ~ the way
| 89168 [vjoel PATH.B] Ok. I guess I have to expand_path if I want that behavior.
+ 89167 [vjoel PATH.B] Yep, that was it. Thanks!

^ Execute code on descendant class init
89171 [chrismo clab] class Main
89172 [gfb tonesoft] class Root
89175 [chrismo clab] Perfect! Thx.
89303 [bob.news gmx] "Chris Morris" <chrismo@clabs.org> schrieb im Newsbeitrag
89337 [chrismo clab] In my example, the subclasses descend from Root, not Main.
89364 [bob.news gmx] "Chris Morris" <chrismo@clabs.org> schrieb im Newsbeitrag
89377 [chrismo clab] Ah, interesting ... I'll have to look that over (my brain is away from

^ Include path?
89173 [eurleif ecri] Sorry for the newbie question, but is there an enviornment variable or
89176 [gfb tonesoft] Try environment variable RUBYLIB, it adds directories to $: (it works

^ DRb question
89174 [jos catnook.] I am trying to write a simple remote execution framework, and am running into a
+ 89196 [sdate everes] into a
| 89250 [jos catnook.] Btw, this is with ruby-1.8.1 and dRuby 2.0.4 on a recent FreeBSD -current,
+ 89286 [jos catnook.] Never mind, I found the problem in my code triggering this error after
  89349 [sdate everes] above
  89358 [jos catnook.] I just updated the code on the website. This is far from complete though, it
  89415 [sdate everes] Thanks ! Where can I find apollo.rb ?
  89421 [jos catnook.] Actually, you'll want common.rb, I just put it up.

^ nuby question: f.rename(x,y) does not work
89180 [bxs hadiko.d] somehow File.rename does not work in the little script i pasted below,
89181 [decoux moulo] this is a singleton method
89182 [bxs hadiko.d] OK, so what do I do now ?
89183 [decoux moulo] Just do like in [ruby-talk:89181] use File.rename
89184 [bxs hadiko.d] Ah, OK,

^ Ruby explained to Python programmers
89185 [glenfant-nos] I googled for a "ruby presentation for python programmers" (like me :-) but
+ 89186 [hal9000 hype] I think there is something like this on rubygarden.org -- sorry I can't
| + 89187 [hal9000 hype] Umm, there is also an appendix in _The Ruby Way_. :)
| | 89217 [lists zara.6] I find the said document very helpful, as well as the "From Perl To
| | 89240 [hal9000 hype] Yes, much of it is out of date. This book was started late in 2000,
| | 89248 [sdate everes] Is this true in general or you talking of some specific publisher here?
| | + 89249 [gsinclair so] [Shanko:]
| | + 89251 [lists zara.6] Yes, I'm also surprised that O'Reilly hasn't put out more Ruby titles.
| + 89188 [surrender_it] Btw, I suppose that page mostly shows how to do stuff in ruby that you
+ 89191 [jbritt ruby-] Starting with Ruby? Visit www.ruby-doc.org
+ 89218 [greg puyo.cj] Greg McIntyre ======[ greg@puyo.cjb.net ]===[ http://puyo.cjb.net ]===

^ Best way to send mail in ruby
89189 [rb raphinou.] I have to send a mail from a Ruby script, and wonder what's the best way
+ 89195 [behrends cse] Assuming that you have sendmail/exim/postfix or something else with
+ 89209 [culley fastm] def mail(body, headers)
+ 89232 [rodrigo.berm] require 'net/smtp'

^ successive chroots thanks to continuations?
89192 [rb raphinou.] I have defined several chrooted environments on my computer.
+ 89215 [drbrain segm] The command above uses chroot(8) to run the command in a subshell.
+ 89221 [decoux moulo] chroot(1) is an user command
  89234 [rb raphinou.] yes. Take this as what I want to duplicate in "pure" Ruby.

^ Simple Ruby DB apps/programs ...
89193 [usenets yaho] I was wondering if there are some example of small Ruby(1.8.1) Database
+ 89200 [usenet andre] You should take a look at http://lafcadio.rubyforge.org/. I didn't try
+ 89208 [surrender_it] I think there are samples in <insert your favorite dbms> libraries,
+ 89212 [carl youngbl] My favorite DBMS for small client apps is sqlite.  No other DB comes
  89284 [usenets yaho] Thanks to all.
  89289 [ahoward ngdc] ~/eg/ruby > cat photo.rb
  89298 [usenets yaho] Thanks Ara, I'll definitely will try your example above. And check out
  + 89299 [matt lickey.] pstore.rb uses File.flock to lock the pstore database.  This works if
  | 89316 [usenets yaho] Thanks and please forgive my lack of knowledge of pstore.
  | 89320 [matt lickey.] Yes.
  | + 89379 [usenets yaho] Thanks.
  | + 89619 [vjoel PATH.B] select a directory to be your "database", and FSDB gives you a db object
  + 89321 [ahoward ngdc] i have used it for multi-user in house applications.  i seem to remember you
    89380 [usenets yaho] Thanks Ara.

^ Rublog questions
89194 [hal9000 hype] I probably "just don't get it" yet. So feel free to say,
+ 89199 [chrismo clab] You don't want to do that.
| 89210 [chrismo clab] I meant to smiley face that -- it was funny (most assuredly only to me)
+ 89202 [dave pragpro] You clearly want to do that.
+ 89216 [careck circl] Hal, I'm with you.
  89226 [dave pragpro] Rublog also has a (currently commented out) feature called filters,

^ Problems Extending DateTime
89197 [matt digital] Howdy,

^ classes repository? (was : Best way to send mail in ruby)
89198 [rb raphinou.] Thanks :-)
89201 [austin halos] A lot of these things are snippets on the RubyGarden Wiki, and there is also
89219 [rb raphinou.] The snippets section on rubyforge is cool, but is not that rich in
89389 [tom infoethe] Yours,
89393 [rodrigo.berm] PLEAC [1] (Programming Language Examples Alike Cookbook), is an effort

^ More from using DRb and observers...
89205 [Stephan.Kaem] Andre, thanks for the link to the earlier discussion.
+ 89213 [drbrain segm] ut?
+ 89253 [Stephan.Kaem] thanks for your answer.

^ How to disconnect a drb client?
89206 [nathaniel ta] I have a drb client/server application, and I'd like the server to be
89416 [sdate everes] I was trying hard to come up with a solution which did not involve modifying
89432 [cc1 cec.wust] If you do a callback so both the client and the server have a connection to
89441 [nathaniel ta] What I ended up doing was just having the server invalidate the front

^ #@ and #$ (Was: Re: DRb question)
89214 [drbrain segm] #@varname and #$globalname get expanded to #{@varname} and

^ multithreading with an external library
89220 [lists zara.6] I plan to use Ruby/DL with Firebird 1.5's "embedded server" DLL on
89259 [pbrannan atd] One way to solve this is to have a layer that transfers messages to and

^ webhosting with ruby?
89222 [cpine hellot] Does anyone know of any webhosters offering Ruby (or mod_ruby)?
+ 89223 [jbritt ruby-] James Britt
| 89243 [billk cts.co] I just added http://www.cybersalad.net to the wiki page.
+ 89227 [michael_s_ca] rootr.net is one.
| 89228 [aredridel nb] I do. http://theinternetco.net/
+ 89242 [gfb tonesoft] I came across http://www.1and1.com the other day, they offer free web
+ 89244 [sdate everes] I can strongly recommend  totalweb-inc.com

^ When did IO::read appear?
89229 [W.L.Kleb LaR] IO.read, but when I moved it to a ruby 1.6.8 (2002-12-24)
+ 89230 [dave pragpro] content = File.open(name) { |f| f.read}
+ 89231 [decoux moulo] redefine it, something like (not tested)

^ [Win32] how to set a system-tray-icon with ruby?
89236 [torsten pixe] i am using ruby-1.8.0 on win32 with fxruby and tk. (installed with the
89256 [emmanuel.tou] also, wxwindows supports system tray stuff (but i only ever looked at

^ Method to Proc
89237 [GGarramuno a] Is there a way to turn a method into a proc stored in a variable?
+ 89238 [jgb3 email.b] t = method( :myfunc )
+ 89239 [surrender_it] irb(main):001:0> def f; puts 'ciao' ; end

^ $Kills IRB
89252 [ralph.mason ] I noticed that

^ PGConnGroup not available
89254 [han.holl pob] I would like to have a look at Ara Howard's PGConnGroup, but the server
89263 [ahoward ngdc] i can get this to you offline.  i don't have web space for my code at the
89305 [han.holl pob] Thanks for the archive.

^ libldap-ruby and \000
89255 [bsanyi sunse] please let's have a look at my little ruby program!  It adds
+ 89258 [ttate ttsky.] Could you try the following code?
| 89260 [bsanyi sunse] Thank You, this works.  But I think hashes are more distinct
+ 90175 [bsanyi sunse] the same probleme occures with gq-0.5.0-1 on Debian/woody.

^ class Time doesn't pass year 2038?
89261 [temuphaey0 j] Is there another class to process dates after 2038? (and before 1970)
+ 89262 [temuphaey0 j] Sorry.
+ 89338 [ jupp gmx.de] Just to point that out: We are very close to the middle of epoch
  89341 [markjreed ma] ...
  + 89344 [sdate everes] Please allow my ignorance: what is this all about? I thought epoch was just
  | + 89347 [markjreed ma] Technically, an epoch is a point from which time is
  | + 89350 [hal9000 hype] In general that is true. :)
  |   + 89351 [hal9000 hype] Sorry to reply to myself. Of course, a billion ~= 2**30
  |   + 89352 [markjreed ma] A 32-bit integer can hold 2**32 = 4,294,967,296 values.  In
  + 89392 [dcarrera mat] Could someone tell me an elegant way to figure that out?
    + 89395 [dcarrera mat] Sorry to reply to my own post, but by trial and error I think I found it.
    | 89405 [markjreed ma] Right.
    | 89406 [dcarrera mat] I do love Ruby.  =)
    + 89398 [steven.jenki] For most purposes, yes. UTC is an acronym that equally mis-matches the
    + 89399 [mike ratdog.] Appologies for non-ruby content

^ Consider RubyForge (Was: PGConnGroup not available)
89264 [James.Weiric] I would encourage anyone who has public code to share to consider a

^ Basic Syntax for Extending Instances
89265 [mlipper US-A] Hey everybody,
+ 89267 [austin halos] class Date
+ 89268 [jgb3 email.b] Well, it looks like the problem is that @date_precision is an "instance
  89269 [mlipper US-A] Thank you!
  89270 [mlipper US-A] Thanks!

^ readlines changed from 1.8.0 to 1.8.1?
89266 [vjoel PATH.B] $ cat >foo
89282 [matt lickey.] It is a bug that'll be fixed in future 1.8.x releases (at least, it is

^ name of current ruby iterpreter
89271 [vjoel PATH.B] How can I find the name of the current ruby interpreter? It's not $0,
+ 89272 [thomas_adam1] exec $(which ruby) name_of_script.rb
| 89273 [vjoel PATH.B] 1. It has to work on windows, too.
+ 89274 [rpav mephle.] require 'rbconfig'
  89275 [vjoel PATH.B] Almost there. It won't work if you've got 1.8.0 and 1.8.1 both installed
  89278 [rpav mephle.] Maybe installing one over the other... that's not a good thing.  I
  89280 [vjoel PATH.B] Good idea...I've been meaning to lear encap or stow. But your suggestion

^ Kernel::VERSION
89276 [unet rexx.co] There used to be a constant of this name, which I was using
+ 89277 [lyle users.s] ...
+ 89279 [rpav mephle.] $ irb
+ 89283 [matt lickey.] RUBY_VERSION works too.
  89325 [unet rexx.co] Thanks.  RUBY_VERSION looks good and works as early

^ Re: =?ISO-8859-15?Q?$=A3?= Kills IRB
89281 [ jupp gmx.de] I don't think that it is a real answer but it is because irb aborts

^ proc question and instance_methods
89285 [GGarramuno a] Continuing with the sets of newbie questions...
89287 [jgb3 email.b] If you pass the code to eval, you can then test for a SyntaxError
89306 [rasputnik he] But that would execute the code, wouldn't it?
89308 [bob.news gmx] "Rasputin" <rasputnik@hellooperator.net> schrieb im Newsbeitrag
89319 [jgb3 email.b] Hey, that's clever.  I'll have to remember that trick. :)
89326 [vjoel PATH.B] Except, if you're paranoid...
89331 [nobu.nokada ] See valid_syntax? in sample/test.rb or test/ruby/test_system.rb.

^ Problems getting Apache 2.0.43 and erb to work
89288 [jlsysinc all] I'm running Apache 2.0.43 on Windows XP and trying to setup erb (eruby?).
92676 [jlsysinc all] FWIW, In case others are having this problem, I finally got erb to work.

^ Calling shadowed methods in an inherited object
89290 [cc1 cec.wust] class A
+ 89291 [david.naseby] class A
+ 89292 [jgb3 email.b] def bar
  89297 [cc1 cec.wust] snip
  + 89302 [daniel.doel ] class SuperProxy
  + 89304 [bob.news gmx] "Charles Comstock" <cc1@cec.wustl.edu> schrieb im Newsbeitrag

^ Loading a script in the top-level namespace?
89293 [NoSpam NoSpa] What is the correct way to load a Ruby script into the
89295 [ptkwt aracne] load should do what you want.

^ problems compiling ruby 1.8.1 on AIX 4.3.3
89294 [biblia99 yah] /usr/ccs/bin/ld -brtl -eInit_rmd160 -bI:/home/paul/ruby-1.8.1/ruby.imp -bM:SRE
89296 [nobu.nokada ] Have you installed required stuff (libraries etc.) properly?

^ Ruby.exe crashing with WIN32OLE WMI example?
89300 [yonatan_avra] I'm trying to do some WMI stuff with Ruby.  I found this simple
89301 [botp delmont] I cannot solve it but I can compare it w mine.
89315 [yonatan_avra] Regarding Botp's configuration using Windows XP...
+ 89324 [mikkelfj-ant] "yonatan" <yonatan_avraham@hotmail.com> skrev i en meddelelse
+ 89327 [chrismo clab] No, but FWIW, I've seen this very thing myself -- so at least you know
  89346 [botp delmont] te-phil.com>...
  89360 [yonatan_avra] Botp,

^ plruby in PG distribution
89307 [lists zara.6] I am wondering why plruby has not been included with the PostgreSQL
+ 89309 [samuel.kvarn] Well, I don't know why it isn't included in the standard PG
| 89311 [decoux moulo] If you have a problem with plruby, it's best to contact me in *private*
+ 89310 [decoux moulo] to respond to this question, you must first respond to

^ rub 1.8.1 and $=
89312 [clr1.10.rand] def Myclass
89314 [bob.news gmx] "Patrick Gundlach" <clr1.10.randomuser@spamgourmet.com> schrieb im
89317 [clr1.10.rand] Oh, that's new in 1.8.0. I'll read the news section more carefully
+ 89318 [matz ruby-la] FYI, this also work
+ 89363 [bob.news gmx] "Patrick Gundlach" <clr1.10.randomuser@spamgourmet.com> schrieb im

89313 [martin.morgo] I'm setting a cookie using CGi::Cookie.new and cgi.out ( "cookie" =>

^ Ruby and QT/KDE
89322 [greg brondo.] Is there any mature bindings (like Python has) for KDE/QT and Ruby?
89328 [rb raphinou.] The best candidate is the package Richard DAle is working on.
+ 89329 [ruby-lists l] prerelease available at http://ww.lypanov.net/bindings.html if
+ 89383 [Richard_Dale] Sadly too late for KDE 3.2 as it wasn't included in the release plan 3
  89385 [lypanov kde.] as bindings are not entirely simple distribution-wise in any case
  89388 [Richard_Dale] That's really good news Alex! If we can only sort out the pthreads/crash and
  89403 [ruby-lists l] i've got a few evil ideas for this that i'll work on tonight...
  89413 [ruby-lists l] (whenever it actually syncs with main cvs...)

^ Re: problems compiling ruby 1.8.1 on AIX 4.3.3 AND 5.1
89323 [Paul.Sue tel] # configure
89357 [nobu.nokada ] I'm not sure what you need to use pthread on AIX.

^ more --enable-pthread "problems" [Was Re: Ruby and QT/KDE]
89330 [ruby-lists l] unforunately after a bit of investigation

^ File checks....
89332 [GGarramuno a] Is there anything in Ruby similar to Perl's if -r, -x, etc. switches?
+ 89333 [thelenm cs.u] You can use the FileTest methods, e.g.
+ 89334 [vjoel PATH.B] irb(main):001:0> test ?r, "."
+ 89335 [gfb tonesoft] Check out methods of module FileTest p FileTest.methods). Class File
+ 89336 [gsinclair so] www.ruby-doc.org

^ Compression (besides Huffman) and Ruby
89339 [ jupp gmx.de] I don't want to start a lenghty thread about wether that makes sense
+ 89343 [wjl icecaver] charset="utf-8"
| 89419 [ jupp gmx.de] Wasn't aware that 1.8 has zlib binding. watashi wa baka desu :->
| 89420 [vjoel PATH.B] Not if you know how to say that ;)
+ 89345 [jgb3 email.b] I've played with the idea of implementing zlib in  pure Ruby...
| 89348 [markjreed ma] I've got the bare bones of a Ruby implementation of adaptive arithmetic
| 89356 [jgb3 email.b] Heh. :)  Well, the point of doing it in Ruby isn't to win races, I
| + 89365 [bob.news gmx] "Jamis Buck" <jgb3@email.byu.edu> schrieb im Newsbeitrag
| | 89371 [jgb3 email.b] Very true.  Generally, C *is* portable, and in general, such things
| | + 89372 [bob.news gmx] "Jamis Buck" <jgb3@email.byu.edu> schrieb im Newsbeitrag
| | + 89375 [ jimm io.com] A good point. That's what some Smalltalks do, but in an even more useful
| + 89366 [Ephaeton gmx] This doesn't make any sense. When it's possible to have a ansi c compliant
+ 89381 [austin halos] the PragProg distribution for Windows, zlib is also present.
  89394 [jgb3 email.b] Thanks.  It is true, that with 1.8.x and zlib, there shouldn't be a real