53120-60465 subjects 53491-54326

^ Ruby GC Change
53298 [billtj z.glu] ..... as inspired by how gc is exactly done in Lua, perhaps?  :)

^ Where is socket defined
53303 [web2ed yahoo] Can someone tell me where the implementation source is for socket.so?
53305 [billtj z.glu] In some linux/unix distribution, "socket.c" is placed under

^ Sorry, just a test
53312 [ kosha Kp.ru] WBR

^ Is the debugger broken?
53315 [gsinclair so] Is it just me or does the debugger not work the way it is supposed to?
+ 53317 [nahi keynaut] It is expected behaviour because the current debugger does
| + 53333 [gsinclair so] I'll look out for it.  It may take me a few days, but I will get back to you.
| | 53424 [nahi keynaut] Here is another workaround for debug.rb in 1.6 althourgh
| + 53554 [laurent mold] Actually, any one line loop makes the debugger enter in a endless
| + 53622 [gsinclair so] Hmmm... I was going from memory when writing "there are problems with loops".
|   53623 [gsinclair so] too
+ 53665 [gsinclair so] you
  53670 [meier meiste] story
  53809 [jfh cise.ufl] I've just run into this problem this morning. The pattern I seem to be

^ PostgreSQL samples
53316 [ kosha Kp.ru] Where can i find an example code for postgresql ruby module ?
53318 [davinci esco] El miñÓcoles 16 de octubre, Korshunov Ilya escribióº
53319 [ kosha Kp.ru] Thanks.

^ Starting interactive shell/irb from within a script?
53322 [paul floorba] I was wondering if there exists a module that allows you to start an
53327 [stefan.schol] Take a look at irb. It's a very easy and small script.

^ Hooking on method invocation
53328 [viking funca] Is there a way to hook on invocation of *any* instance method of an
+ 53338 [batsman.geo ] Delegation maybe?
| 53346 [batsman.geo ] module Observable
| 53354 [ahoward fsl.] that seems pretty complicated - it seems like what is needed is a
| 53360 [batsman.geo ] In fact this could be meaningful w/ any method that changes the state
+ 53367 [avi beta4.co] ...
| 53431 [decoux moulo] Look at fwrap, I think that you can have a better interface with it
+ 53373 [billtj z.glu] I am sorry that I think the whole discussion has advanced to a new

^ gsub and Backslashes
53331 [billtj y.glu] Can you give an example of how it may be tricky (causing
53377 [n1k0 rogers.] I'm assuming he was referring to Botp's wish list not the ruby newcomers list (my mail reader thinks he was replying to that post).
53543 [umarumohamme] ibz@ignoramus:$ irb
53547 [billtj y.glu] Thanks for the input.  I will include it in the list.

^ XML-RPC connection failed
53349 [pooh cs.tu-b] Dear Ruby Experts,
53352 [kentda stud.] Try setting the server hostname or IP when you create the server. The

^ Things That Newcomers to Ruby Should Know (10/16/02)
53359 [billtj y.glu] I just updated the list, which is also available in HTML format at
+ 53541 [kgergely mla] Also notice (performance tip), that
| + 53548 [billtj y.glu] Thanks.  Although I think performance-related issues should be in another
| + 53772 [ian caliban.] Hmm, why does 'string += another' need to create a new object? string
|   53774 [hal9000 hype] It's a feature. :) The notation a+=b really, REALLY
|   53775 [ian caliban.] I understand that, but since 'a' already exists prior to assigning a + b
|   + 53776 [rich infoeth] 'a' is a variable...not an object.
|   + 53778 [hal9000 hype] Look at it this way: The expression a + b yields a
|   + 53822 [billtj z.glu] Based on previous responses, I think a standard example answer to your
|   | 53984 [ian caliban.] Thanks, William. Your example is both succinct and very clear.
|   | 53998 [billtj y.glu] I will put it in the list.
|   + 53933 [bulatz integ] main problem is that object pointed by 'a' mauy be also pointed by
|     53940 [batsman.geo ] Would it be possible for Ruby to know whether an object is referenced by
|     + 53941 [bulatz integ] simple things must remain simple :)  instead of counting references
|     | 53951 [batsman.geo ] Yeah, KISS applies always, but I may anyway try to implement this in the
|     | + 53953 [app1tam ups.] But why does it really, REALLY mean that?  Was there a reason for doing
|     | | + 53956 [gsinclair so] It's just the way it is.  In C++, the following are separate overloadable
|     | | | 53999 [eric.armstro] begin
|     | | + 53960 [billtj z.glu] As already been pointed out, this is because in Ruby when a variable is
|     | | + 53961 [austin halos] It's non-sensical. << exists only as Array#<<, String#<<, and IO#<<
|     | | + 54007 [hal9000 hype] It's fairly trivial to change the behavior, but the
|     | |   54015 [billtj y.glu] In my opinion, for any "reasonable" programmer, it is usually not the
|     | |   54043 [dblack candl] I don't think "a += 'str'" (or whatever) is creating an intermediate
|     | |   + 54052 [billtj z.glu] Probably "intermediate" is not an exact terminology; maybe "new" object is
|     | |   + 54072 [austin halos] intermediate
|     | |     54077 [dblack candl] I think that's kind of a roundabout way to describe it though.  I
|     | |     54108 [kgergely mla] BTW, ONE or TWO intermediate objects?
|     | |     54114 [bulatz integ] ONE intermediate object and ONE assigned to b. this intermediate
|     | + 54091 [bulatz integ] operation 1
|     |   54124 [billtj y.glu] I am not sure if it will make ruby fatter; I cannot verify whether
|     + 53942 [gsinclair so] I don't think so.  += is syntax sugar for you-know-what.  Imagine trying to
|       53950 [batsman.geo ] [Disclaimer: I'm not proposing a modification of the language, see [52838]
|       53955 [billtj z.glu] If you do "incomplete RC", basically you have to find all the places where
|       53966 [batsman.geo ] What I was thinking of isn't really GC, but a rather elaborated COW with
|       + 53982 [app1tam ups.] It's not non-sensical.  If it appeared that I mean for all objects to use
|       | + 53983 [app1tam ups.] Actually, the way you describe '+=' makes sense to me.  It is what I would
|       | | 54001 [billtj y.glu] Actually Ruby still gives you a choice.  When you have
|       | | 54012 [dblack candl] True, although the term "side effects" might be ascribing more
|       | | 54019 [billtj y.glu] Your example is really interesting (surprising to me, actually).  Aren't
|       | | 54221 [B.Candler po] I also find this interesting, as it's a side-effect of subclassing I hadn't
|       | + 53986 [austin halos] It still remains non-sensical because it then becomes necessary to
|       |   + 53990 [alan digikat] I totally agree with you. Ruby's way of doing it makes the performance
|       |   + 54003 [billtj y.glu] I probably would not call C++ nonsensical and broken; I think it is just a
|       + 54000 [billtj y.glu] I guess then basically the optimization will work only with Ruby
|         54034 [batsman.geo ] Writing extensions is always quite unsafe, so we're already trusting the
|         54050 [billtj z.glu] I think there are already existing Ruby applications/library/extensions
|         54051 [batsman.geo ] How many do need several references to the same string from the C side?
|         54057 [billtj z.glu] I think the point is not *how many* but just if *there exists* some C code
|         54066 [batsman.geo ] I was thinking 'how many' because I could always "fix" them if it's only
+ 53558 [eric.armstro] Online copy of the Pragmatic Programmer's Guide available
+ 53680 [billtj z.glu] Based on the comments that I received, I just updated the list
  53754 [botp delmont] Are you linked to ruby-lang or ruby.ch? I do hope so since I may forget your
  53769 [billtj z.glu] I am not.  But fortunately, a gentleman (Armin Roehrl) has included the

^ Marshaling with ARGF
53368 [google tompa] The Marshal.load function demands an object of type IO. Unfortunately,
53399 [nobu.nokada ] Dirty hack.
53402 [nobu.nokada ] Oops, forgot to flush at the end and propagate taintness.
53419 [matz ruby-la] Commit these fixes, please.
53466 [google tompa] Thanks Nobu & Matz.

^ Plugin autoregistration (inherited method call)
53376 [rubytalk box] i'm trying to write some kind of plugin system for my project ... and
53382 [ruby-talk wh] I believe Transport.inherited is called before the TCPTransport class definition
+ 53384 [rubytalk box] Thanks a lot! That's exactly what i dreamt about :)
+ 53436 [pit capitain] thanks for the code. Very nice idea.

^ Precompiling eval expressions
53378 [B.Candler po] What ways are there to pre-compile an "eval" expression which is going to be
+ 53380 [tsiivola cc.] Like this?
| 53428 [B.Candler po] Ah, some things falling into place now :-)
+ 53383 [tsiivola cc.] Procs are closures: they contain their enclosing environment (ie. as a
  53432 [B.Candler po] I kind-of got that bit already. It's clear that this cannot be a traditional
  53451 [tsiivola cc.] I suspect that this is caused be the eval, not by the closures.
  53453 [gsinclair so] frame,

^ Invalid HTML code in mailing list archives
53381 [pmak aaanime] In the mailing list archives at
53389 [tom.hurst cl] The page doesn't claim to be HTML 4.01; it's just tag soup.  Really bad

^ Method#arity problem
53385 [info mjais.d] def get_arity(c)
53395 [pbrannan atd] irb(main):001:0> Kernel.instance_method(:putc).arity

^ DBI:Pg 'autocommit' is not a valid option name
53388 [schuerig acm] I'm trying to use transactions with DBI and PostgreSQL and I'm running
53405 [jweirich one] This works for me with DBI ...
53408 [schuerig acm] Doesn't work for me, although I'm sure it should. I have no idea what's
53414 [jweirich one] Here's the full script.  This one was written against the Pg DBD.  When
53421 [schuerig acm] Here's where it fails with
53698 [520079130762] Try the previous version (0.0.16) of Ruby/DBI until this has been

^ fork and exec
53390 [mengx tvrati] I ran the program below.
53398 [nobu.nokada ] exec ("exec cat < ttt") if pid.nil?
53566 [web2ed yahoo] Is there any chance Ruby will eventually have its `own' OS hooks so
53761 [nobu.nokada ] Though I'm not sure what you mean by "OS hooks", do you want to

^ How to tell if a method accepts this many arguments?
53394 [pmak aaanime] m = board.method(cmd)
53420 [pmak aaanime] Thinking more about this, wouldn't it make more sense for Method#arity

53413 [hyukjoon e5-] Can anyone tell me the way to get rid of the intermediate temporary file
53418 [nobu.nokada ] What you want is an equivalent to `cmd1 | cmd2 | cmd3' in

^ Strings or symbols?
53417 [pmak aaanime] When working with a record that has various fields represented using a
+ 53423 [gsinclair so] Your examples are the wrong way around!
| 53425 [kentda stud.] Or converting strings to symbols, if I understood the OP correctly :-)
+ 53435 [ndrsbngtssn ] I would probably use symbols, since it is the same few values used many

^ Date handling with DBI
53422 [gsinclair so] Rubyists,
+ 53454 [meier meiste] andler
| 53467 [gsinclair so] stm = dbh.prepare("intert into test values (?)")
| + 53476 [meier meiste] date
| + 53502 [gsinclair so] date
|   53532 [ahoward fsl.] silly question, but have you tried quoting the date string?
|   53569 [gsinclair so] Thanks 'a' :)
+ 53601 [jweirich one] This worked for me (using the PostgreSQL driver) ....
  53606 [gsinclair so] Thanks Jim.  I didn't even *know* about DBI::Date, and I've spent ages reading

^ Converting String to Time would be nice
53426 [gsinclair so] Comments?
+ 53427 [nahi keynaut] +1 to ParseDate.
| 53429 [gsinclair so] "%x %X" *is* according to locale.
| 53433 [nahi keynaut] My apologies.  I completely missed the point...  You need
+ 53430 [phasis korne] require 'time'

^ Multiple constructors in a .c extension?
53437 [paul floorba] I was wondering if it is wise/common practice/allowed to have multiple
+ 53438 [enric 1smart] This brings another question, why does ruby use as default an instance
| 53452 [gsinclair so] When you perform "x = Froz.new", you're not calling Froz.new, you're callnig
| 53456 [enric 1smart] Sorry to ask, I'm a newbie with Ruby, and I don't understand what means
| 53460 [billtj z.glu] I think what Gavin meant was to replace "Test.new_from_file" with
+ 53449 [nobu.nokada ] You would be surprised when you create a subclass.
  53464 [billtj z.glu] "... Data_Make_Struct. However, although this allocates memory for the

^ Subclass IO ...
53439 [marco.koegle] I'm writing an application with a graphical (OpenGL) console, which is
+ 53445 [nobu.nokada ] $defout needs "write" method.
+ 53450 [gsinclair so] You may not need to subclass IO.  Just create a class or object that implements

^ behaviour of nil
53440 [cedric.foll-] why the '+' method of nil isn't defined ?
+ 53446 [peter semant] The problem here is that nil + "aaa" doesn't work the same way as in
| 53458 [michael_s_ca] =====
| 53462 [peter semant] However he also stated that it worked in Perl which to me shows that he
| 53472 [cedric.foll-] No ! Be sure that "he has thinking in terms of object / method / reciever"
+ 53448 [gsinclair so] Some people will give you good reasons why it's not like that in Ruby.  You
+ 53457 [Dave Pragmat] The current behavior is a useful way to catch programming errors such
  53515 [kgergely mla] This can be tracked down if all fields must be explicitly defined.
  + 53518 [decoux moulo] What is the next step : declare all classes, all variables, all methods ?
  + 53538 [ahoward fsl.] if what you mean by defined is that storage is reserved for a symbol, as
    + 53539 [kgergely mla] What if smu is the correct spelling?
    + 53731 [qute klog.dk] ======================================================
      53738 [ahoward fsl.] duh!  can't believe i didn't think of that... i do it perl all the time too!

^ Buggy shebang behavior with different newline style
53441 [paul floorba] After some puzzling I found out why my script with correct shebang line
+ 53442 [paul floorba] Dang, that's in 1.6.7, BTW
+ 53443 [nobu.nokada ] It's due to the kernel behavior.  Claim to the linux
+ 53444 [tom.hurst cl] This is an operating system thing, nothing to do with Ruby; the error is
+ 53455 [nobu.nokada ] An easy workaround. ;-)

^ Enumerable.partition
53471 [google tompa] I see that Enumerable.partition has been added somewhere between 1.6.7
53501 [nobu.nokada ] This seems nice.
+ 53642 [google tompa] Fair enough, but there's no need to include both "partition" and
| 53647 [matz ruby-la] But still, I feel they are different.  The original one does split
+ 53700 [qrczak knm.o] s1, s2 = s.partition {|x| ...}

^ File.makedirs and permissions
53473 [pbrannan atd] def makedirs(*dirs)
53484 [tarasis btop] My guess would be that mode is only really supported on *nix platforms

^ DevelAALogger - missing ?
53474 [rgroenenberg] This message is in MIME format. Since your mail reader does not understand
53507 [nahi keynaut] I'm sorry for strange name. :)

^ Hashes v.s. Classes (was Re: Strings or symbols?)
53477 [pmak aaanime] I've thought of doing that, but I found certain properties of the hash
53480 [ndrsbngtssn ] You can get the names of all instance variables of an object with
53500 [hal9000 hype] 1. Give your class a to_hash method (maybe

^ Ruby on RedHat 8.0?
53478 [web2ed yahoo] Does anybody know whether Ruby made it into RedHat's last release
+ 53487 [W.L.Kleb lar] It's been in there since RedHat 7.2, IIRC.
+ 53488 [lyle users.s] Yes, it's Ruby 1.6.7. (I believe it was also there in the Red Hat 7.x
| 53497 [ian caliban.] It was introduced in Red Hat Linux 7.3, but the packages are rather
| 53511 [botp delmont] I see it. It's simply cool and helpful.
| 54101 [zx is.pku.ed] I do not find it on ruby-lang.What is raa?
| 54122 [alwagner tca] ...
+ 53489 [ianm ActiveS] It also ships with Mandrake 9. As I discovered just after I'd built it

^ Having trouble installing OSSL
53481 [sera fhwang.] I'm trying to install OSSL, but it gives me this error when I run
53483 [gotoken notw] Try
53540 [sera fhwang.] I looked for ssl.h, and it's in /usr/local/ssl/include/openssl/ ...
+ 53542 [gotoken notw] % ruby extconf.rb --with-ssl-include=/usr/local/include/openssl \
+ 53546 [m.rokos sh.c] ruby extconf.rb --with-openssl-dir=/usr/local/ssl
  53695 [sera fhwang.] gcc -fPIC -g -O2  -I. -I/usr/local/lib/ruby/1.6/i686-linux -I.
  53705 [m.rokos sh.c] What version of OSSL do you have? 0.1.2a?
  53870 [sera fhwang.] I've been trying to install 0.1.2, on a Linux box.

^ FW: DevelAALogger - missing ?
53482 [rgroenenberg] This message is in MIME format. Since your mail reader does not understand

^ Help
53486 [ricard buffa] and I have a problem, I have created a php page that generates a html

^ Assignment
53490 [marnaudo inw] error = 0
53492 [billk cts.co] Did you mean != ... (not-equal, as opposed to equal not?)
53552 [marnaudo inw] Thanks Bill,
53555 [marnaudo inw] Hemm, NOW it works!