14006-14846 subjects 14422-15986

RE: How does one interpret a RUBY.EXE.stackdump file? (fwd)
14181 [ntalbott@ro ] Uh oh... it looks like your ruby interpreter is not compiled with debug

gsub and literal strings
14203 [skeeler@si i] How do you do a global string substitution when the pattern string is given
+ 14204 [matz@ze ab t] How about
+ 14205 [skeeler@si i] Aha! Regexp.escape.
  14206 [matz@ze ab t] String#[]= is one of gotcha-you-dont-know-this stuffs.  You don't have

Streams and other processes
14213 [chrris@ma l.] I do a
14219 [Dave@Pr gm t] Would IO#popen do what you want?
14258 [chrris@ma l.] Excactly.

Escaping single qoutes
14214 [chrris@ma l.] I have a string containing some single qoutes which I would like to prefix
14218 [   nk@LF ne ] I've successfully tried
14257 [chrris@ma l.] I see. I guess I was confused by irb's output (it seems any occurences of

An or in an if.
14221 [ tjp@vb .n t] This is probably really simple, but how do I use an or on the right hand
+ 14223 [jim@fr ez .o] What about
+ 14227 [mike@st k. o] if n ==3 or n == 5
| 14228 [ tjp@vb .n t] It does indeed. I thought it would be simple. Thanks.
| 14231 [hipster@xs a] if [3, 5, 42].include? n
+ 14232 [elderburn@mi] n == 3 or n == 5 ? true : false

Typechecking problem with ruby module for swig
14225 [pbranna@no p] Using Swig 1.3a5, I have noticed the following.  If I create a class

|| .. or Question
14226 [jim@fr ez .o] Why do I get the following output
14234 [matz@ze ab t] Because they are different.  Parenthesises in case1 are for expression
+ 14235 [jim@fr ez .o] Very clear.
+ 14268 [in6x059@pu l] Why is 'n == 3 or n == 5' not an expression? And
  14280 [matz@ze ab t] Simply precedence reason.  In Ruby, statements are expressions that
  + 14299 [in6x059@pu l] [ Original problem: 'puts (n == 3 or n == 5)' gives a parse error,
  | 14327 [matz@ze ab t] No, no "list operator".  But it's little bit too complicated for me to
  | 14375 [in6x059@pu l] I didn't meant that there actually is a list operator. I just cannot
  | 14434 [neumann@s- i] There's a difference between expressions "expr" and function arguments "arg".
  + 14374 [pixel@ma dr ] Math.sqrt (1-2).abs       is      (Math.sqrt(1-2)).abs
    14433 [neumann@s- i] Return is a keyword in Ruby not a method call. It's parsing behavior is

Re: ruby and python communities
14229 [kentda@st d.] A troll by any other name would stink as bad?
14233 [elderburn@mi] Ooooo...you dream darkly! :-)

SV:  || .. or Question
14230 [dennisdecker] -Case4

Ruby vs. Tcl input/output question
14236 [donotreply@i] [I am new to ruby]
+ 14269 [in6x059@pu l] I am quite new to ruby too, but maybe my answer (partly derived from
+ 14278 [matz@ze ab t] I don't use chomp() that often.  Plus auto treatment of EOL hide
| 14354 [matju@sy pa ] Whatever "Ruby" (or you) chooses, I choose the non-thread model, because
| 14362 [green@Fr eB ] And if anyone else is interested, I've written a decent-sized threaded
+ 14303 [wbsoft@xs al] Me too, but (also) coming from Tcl

Re: Escaping single quotes
14237 [jtobler@Wi e] Me too.  On ruby 1.7.0 (2001-04-02) [i686-cygwin] checked out from CVS and

question about String.split
14239 [newsgroups@e] run this line in ruby...
14241 [mike@st k. o] Use a negative limit on the split to stop it stripping trailing empty

converting some 'eval's from perl
14246 [ptkwt@sh ll ] I'm converting some Perl code to Ruby and for the most part it's gone
14248 [dblack@ca dl] ^ you forgot the closing "  :-)
14249 [ptkwt@sh ll ] Thanks, David.  I thought I tried something very similar, but it still

Thanks. Re: question about String.split
14247 [newsgroups@e] it does

1.6.3 Windows installable version?
14250 [ptkwt@sh ll ] I looked on RubyCentral for the latest Windows installer version and it's
14259 [andy@to ls e] Whoa!  Ya'll caught me asleep at the switch.  I haven't been following
14265 [LuthyCraig@J] Phil,

Compiling under cygwin 1.1.8-2
14252 [rob.blackbou] I'd like to be able to build this myself. I have the latest cygwin (as of
+ 14253 [matz@ze ab t] It should be zero sized file.  It is there to stop configure complain.
+ 14254 [rob.blackbou] Sorry guys. As ever the answer was in the question. I made the symbolic link

daemon ruby script
14255 [ps@ra ia .m ] I would like to have one of my ruby programs running in the background at all
+ 14261 [Dave@Pr gm t] "rw" is an illegal access mode, but because $stderr is closed, the
+ 14541 [lists.ruby-t] I've also been working on a daemon process, one I'm hoping to put on

Need help with install
14260 [jim@fr ez .o] I am installing ruby on a virtual server FreeBSD machine.
14270 [dgjs@ac .o g] If you run 'configure --help', among other things you'll see

Ruby on Windows problem
14262 [karl_lopes@y] I would like to find out if others using ruby on
+ 14263 [niyer@ta pa ] irb is working fine. I dont know what rd2 is????
| 14264 [karl_lopes@y] Yes, all those paths are set. When I try to start irb,
| + 14282 [jj5412@ea th] Is irb being started using rubyw (which doesn't have stdin, stdout, and
| | 14300 [karl_lopes@y] Nope the irb.bat file points to the irb file which is
| | 14315 [andy@to ls e] Indeed it does not -- the only bat file I create
| | 14317 [karl_lopes@y] Thanks;-)
| + 14283 [jj5412@ea th] Is irb being started using rubyw (which doesn't have stdin, stdout, and
+ 14307 [in6x059@pu l] What flavor of MS-Windows are you using? I had almost no problems

how change instances class
14266 [hvrosen@wo l] ...
+ 14287 [shugo@ru y- ] I think it is dangerous to change classes of instances.
| 14296 [WYS@he bl ng] ...what do you mean by "attribute"?
+ 14373 [in6x059@pu l] Since many objectoriented languages don't allow to change the class an

upgrading Ruby and the effect on C extenstions
14272 [ptkwt@sh ll ] This is a heads up type of post...  I had a problem when I upgraded from
14277 [matz@ze ab t] It's not my intention, probably a bug.  Could you send me your script?

Possible minor bug in io.c
14275 [Dave@Pr gm t] static void
14279 [matz@ze ab t] Yes.  Thank you.

basic socket question
14281 [volkmann2@ho] This should be an easy one for anyone that has successfully used sockets in
+ 14290 [rise@kn ve y] Oddly enough, I get no errors for that.  I think your problem isn't in
+ 14293 [jdf@po ox co] EWINDOWS - you are trying to use Ruby on Windows.  I have experienced
+ 14294 [rick@be rd i] As I went through the pickaxe, I created a file called socket.rb.  Well,
+ 14295 [matz@ze ab t] What platform do you run Ruby?  Cygwin?
| 14312 [volkmann2@ho] I'm running on Windows 2000. Previous posters indicated that the socket code
| 14324 [matz@ze ab t] Probably.  I'd rather like to blame Windows socket implementation.
+ 14583 [tarod@ho e. ] in
  14587 [Dave@Pr gm t] When this happens, what does 'netstat -a' show? Are there a lot of

method for adding methods?
14286 [colin@we g2 ] Is there an actual _method_ one can call to add methods to a class?
14304 [matz@ze ab t] Module#define_method is available for 1.7, but handle it with care.
14337 [Dave@Pr gm t] For example, you can use it to implement class variables that are only

Ruby mascot proposal. Will this end ?
14288 [furifilo901@] Sumimasen, everybody.
+ 14291 [hal9000@hy e] [snip excellent remarks begging for end of
+ 14292 [gnhurst@hu s] That someone would be me, and I *did* use python eventually, but my point
  + 14298 [schneik@us i] # [Argue, argue, argue, ... snipped.]
  | + 14301 [gnhurst@hu s] What do you propose for display graphics at a conference?
  | | 14311 [schneik@us i] # > ...
  | + 14319 [furifilo901@] Enviado el: Viernes, 27 de Abril de 2001 02:18 a.m.
  | + 14386 [r2d2@ma .a c] Designing a logo with a community process is hopeless. The only rational
  |   14391 [jim@fr ez .o] * Evil dictator says, ok, I made a mistake, please submit your
  |   14393 [in6x059@pu l] At least in the world of free software I have seen very few 'Evil'
  + 14323 [furifilo901@] Guy, since I was not able to keep my post's content impersonal, I want to

RCR: Array#insert
14289 [shugo@ru y- ] Some people asked the same question. Is it a bad idea to provide
+ 14308 [wbsoft@xs al] I'm new to ruby, but I think that would be nice, and when you call
| 14325 [matz@ze ab t] You already have Array#unshift.
+ 14328 [matz@ze ab t] Sounds good.  Define a behavior of Array#insert, please.
  14332 [ugly-daemon@] How about it takes two arguments one for the position in the array to insert and the other the object to insert??
  14347 [neumann@s- i] class Array
  14363 [maki@op n- e] class Array
  + 14365 [dblack@ca dl] class Array
  + 14371 [in6x059@pu l] I would actually prefer an version that is able to insert more than
    14479 [shugo@ru y- ] I agree.
    14481 [matz@ze ab t] Sounds good.  It will be merged into the development branch.
    + 14486 [gnhurst@hu s] What about his alternate version that handled negative indices
    | 14494 [matz@ze ab t] Hmm, there's tradeoff between inconsistency (to []= at least) and
    | 14502 [gnhurst@hu s] We did discuss this before also, in the thread starting at [ruby-talk:5692],
    | 14643 [matz@ze ab t] You've succeeded to persuade me.
    + 14491 [elderburn@mi] FWIW this also works with String, trival but useful :-)

SV:  Re: how change instances class
14310 [hvrosen@wo l] sorry about inappropriate vocabulary. I imagined that, somewhere in the
14313 [hvrosen@wo l] SV:  Re: how change instances class
14368 [hal9000@hy e] human
14372 [ugly-daemon@] I am a newbie in matters like this so maybe I have it wrong but... it sounds like we already have this. Namely, I think that this is analogous to having an instantiated object whose type we don't know. i.e.

Q: how to track memory-usage?
14314 [imperator@ca] To me, this looks like someone got irb to display memory-usage (and a

Re: basic socket question REPOST
14329 [paa@Ca al g-] Again, I had this same problem using the Pragmatic distr, but not with
14336 [jdf@po ox co] I hadn't heard of the ActiveScript distro until now.  I just

The Ruby Programming Language Book by Matz
14330 [as646@Fr eN ] I went to Amazon.com to look for Ruby books.  I notice that you have
14482 [matz@ze ab t] Don't trust the date.  I haven't finished materials yet.  Plus,
14488 [in6x059@pu l] So its type is quite similar to 'Programming Ruby'? But more advanced
14492 [matz@ze ab t] My book has far less reference.  But highlite of the book is chapter

Immutable Arrays?
14334 [johannh@uc i] Is there any way to flag an Array as immutable, so I can use it
14340 [gnhurst@hu s] a = [2,3,4]  # array
14358 [johannh@uc i] class Tuple < Array
14382 [dennisdecker] Notice the default behaviour for String-keys (Thanks to Dave and Andy for
14385 [johannh@uc i] Good lord, no.  That would make hashes useless for large objects where

Does ruby have destructors that are easy to use?
14335 [jfn@en er ct] While helping a friend convert a program from perl to ruby, he wanted to
14400 [ben_tilly@op] Ruby doesn't have reliable destruction mechanics.

gtk and Float/to_f
14339 [thomasl@ce c] 6.3
14425 [matz@ze ab t] Weird.  Platform information, please?
+ 14430 [guillaume.ru] matz@zetabits.com (Yukihiro Matsumoto)
| 14431 [elderburn@mi] And I do not :>?
+ 14435 [thomasl@ce c] ruby 1.6.3 (2001-03-19) [sparc-solaris2.8]
| 14438 [0104@cl ak d] Curious.  Debian stable here too.
+ 14457 [thomasl@ce c] Ok! I solved it! I live in Sweden.

array as index to array
14341 [jonas.bulow@] Maybe this has been discussed before, but anyway..
14344 [Dave@Pr gm t] Somewhat indirectly, you can use indexes (or indices)

Question about define_finalizer
14342 [jim@fr ez .o] #! /usr/local/bin/ruby -rdebug
14360 [matz@ze ab t] You can not access "self" within finalizers, because they are called

Ruby DB support for Windows
14343 [cyoungbl@le ] I would like to install MySQL support on my Windows (1.6.2) installation of

case and to_s
14346 [jim@fr ez .o] I am trying to add a clase to a list depending upon the
+ 14348 [dblack@ca dl] I don't think it's a matter of #to_s getting called -- but
| 14349 [jim@fr ez .o] I just figured this out.
+ 14351 [Dave@Pr gm t] case d

What's an RCR??
14352 [ugly-daemon@] Sincerly,
14353 [Dave@Pr gm t] RCR's are Ruby Change Requests. When someone wants a new feature, they
14355 [ugly-daemon@] Thanks a bunch Dave!!
14356 [ugly-daemon@] I just thought of something. May we have this question put into the FAQ??
14357 [Dave@Pr gm t] It's on the list. Good idea.

Where for art thou, rdtool for Win9x?
14359 [jj5412@ea th] Can anyone tell me where I can get a functional rdtool for Win9x? I scoured
14379 [toshirok@yb ] RDtool doesn't have the equivalent of perldoc. it's just an formatter.
14380 [rise@kn ve y] As far as I know RDTool is pure Ruby, so you shouldn't need to compile
14395 [jj5412@ea th] X-noarchive=yes
14414 [rise@kn ve y] Please note that right now RDSearch would be a better name since the main

Newbie query - how to propose a new feature in Ruby
14361 [andy.elvey@p] ...
14364 [Dave@Pr gm t] Welcome.

Ruby and ActiveX
14370 [christof.mar] is there a way to use/call ActiveX components from within Ruby and/or to
14401 [neumann@s- i] As far as I know are OLE, ActiveX and COM three words for (almost) one and

Ruby OpenGL question
14378 [mfp@st de ts] I have a question about Yoshi's recently updated OpenGL interface module. The
14383 [elderburn@mi] Well, I had a similar probelm with a prior release of Yoshi's OpenGL. There

Separating the wheat from the chaff.
14381 [marcbutler1@] Would it be possible to split the ruby-talk into two groups delineated by subject matter?  My personal intuition is one group named 'community' for discussion of predominantly non-technical issues such as Mascots, book reviews, ruby group meetings, and "what other people said about ruby" discussions.  The other list would be focused on technical concerns, such as language problems, questions and patches.
+ 14384 [elderburn@mi] LOL re the sig! :-)
| 14394 [skeeler@si i] What would help me separate different kinds of wheat (no chaff on this
+ 14392 [in6x059@pu l] I would like to object. I don't think that the traffic on the list is
+ 14403 [0104@cl ak d] Have you considered reading the comp.lang.ruby newsgroup with a
  + 14411 [mdavis@se ai] I would agree with this.  I enjoy this list to see how others solve
  | 14412 [marc.butler@] I think this is a non-issue.  There is nothing to stop people subscribing to
  | 14416 [0104@cl ak d] Here is another point: do you propose to split the newsgroup too?  If
  + 14415 [jdf@po ox co] Unfortunately, it is impossible to thread this group correctly,
    14419 [0104@cl ak d] 1. What's breaking them?
    14421 [marc.butler@] I don't understand the difficulties of splitting the newsgroup to reflect
    + 14427 [elderburn@mi] Would someone kindly enlighten me as to in what manner I have 'attack'ed
    | 14429 [marc.butler@] You inferred in your post my motivation was personal convenience,
    | 14439 [0104@cl ak d] The motivation *is* personal convenience in that one does not wish to
    + 14440 [0104@cl ak d] If comp.* functions as with other structures which I am familiar with,
      14446 [marc.butler@] For my intuition the silence indicates this thread should die, and the

Re: Whither SmallScript? (was Re: Integer micro-benchmarks)
14387 [pulsar@qk .c] About an hour or so after your last post to me, I realized you're one of the
14404 [aleaxit@ya o] open('test.dat','w').write('Hello world!\n')

problem compiling 1.6.3
14388 [info@mj is d] I just downloaded ruby 1.6.3 on my RedHat 6.2 machine
14426 [matz@ze ab t] RETSIGTYPE detection corrupted I think.   Try configure after removing

Ruby BUG (marshaling)
14389 [   xm@w3 .r ] I'm too angry right now, so I'll be short :)
14408 [matz@ze ab t] Be calm, please. ;-)
14578 [   xm@w3 .r ] Okay :)))

[REPOST] Retrieving current signal handler without altering it
14390 [ljz@as as .c] [ Note:  I posted this question a couple weeks ago, but I'm not
14397 [ptkwt@sh ll ] currentHandler = trap('HUP','DEFAULT')
14398 [dgjs@ac .o g] That command will set the handler to the default.  If that's not what you
14406 [ljz@as as .c] Well, in Perl, you can do this ...

14396 [avi@cr 98 98] Why does autoload only work for toplevel constants?
14409 [matz@ze ab t] Because it's kinda hard to handle nested constants like "Foo::Bar"
+ 14413 [avi@cr 98 98] That would be very useful, I think.  Can I suggest it as an RCR?
| 14423 [matz@ze ab t] Yes, but I'm still not sure how it is useful.
| 14424 [avi@cr 98 98] Well, I wanted it as a way to deal with dependencies between source files
+ 14420 [matju@sy pa ] package Foo::Bar; sub baz { print "hello\n"; }

Ruby Conference T-shirt
14399 [gnhurst@hu s] We got sidetracked here somewhat by the mascot issue.

equivalent of shelve module in python
14405 [guillaume.ru] Does anybody know about an equivalent of the shelve module in python

Pretty printer/a2ps
14410 [grundel@fy .] Wonder if anyone knows of a pretty printing tool for ruby source files.

Embedded Ruby w/ Apache: Forbidden error
14417 [jj5412@ea th] While trying out the pickaxe embedded Ruby example around pg. 151, I added
14418 [bryan_zarnet] The .rhtml probably has access permission for owner
+ 14436 [jj5412@ea th] Thanks for the reply!
+ 14437 [jj5412@ea th] Solved!