56490-57539

56262-56580 subjects 56652-57446

install.rb: avoiding file name collisions (raa-install too)
56490 [ptkwt@sh ll ] [Maybe this should be added to the packaging FAQ or perhaps to
56494 [ruby-talk@wh] NaHi and I have been discussing this exact same issue for the last two

mod_ruby namespace question
56492 [nemo@he lo r] class String
56532 [kentda@st d.] anonymous module to protect you from nameclashes with other running

raa-install --showall doesn't work
56493 [ptkwt@sh ll ] $ raa-install --showall

Ruby equivalent to perl's...
56503 [michael_s_ca] I apologize for asking this as I know I've seen it, but I can't find
56505 [matz@ru y- a] STDOUT.sync = true
56510 [michael_s_ca] Excellent; thanks.

Site Seeing week 47
56506 [siteseeing@s] Site Seeing is powered by The Startpage of New Zealand!! www.startinnz.com
56507 [dblack@ca dl] Holden, can you please have a word with these people? :-)
56508 [drbrain@se m] com

eRuby vim syntax
56514 [tim@ba es id] Does anyone know if there's a vim syntax file for eRuby? There's a quite good
+ 56521 [d.borodaenko] Just look at jsp.vim and do the same trick, replacing Java with Ruby as
+ 56560 [brailsmt@ya ] vim.sf.net/script.php?script_id=403.  Feedback is welcome.

Re: Need help dynamically creating classes.
56520 [botp@de mo t] am interested, too. Pls post progress in RAA.

mysql-ruby on MacOSX/darwin
56540 [beat@bi kh f] I found some postings regarding my problem dating from July 2002 in
56551 [montana@bu 9] Need more info????
56648 [beat@bi kh f] Sorry, took a little bit longer as www.entropy.ch was down over the weekend.

eruby + Win2K + apache 2.x setup problems
56541 [wayne@mi hr ] I am having problems getting eruby, apache 2.x and Win2K to play
56578 [patrick-may@] Did you set this up on linux with Apache 2, or where you using Apache

find arguments... is this possible
56543 [mhale@ro em ] I want to get the names of the arguments that are passed into a method.
56544 [dblack@ca dl] irb(main):021:0> def my_method(first,second,third)
+ 56548 [batsman.geo@] I suspect the answer will be, uhmmm, interesting.
+ 56568 [decoux@mo lo] pigeon% irb
+ 56582 [mhale@ro em ] I noticed that many times I just hang on to the constuctor variables and
  56592 [g_ogata@op u] class Class
  56591 [g_ogata@op u] ^^^^^  Actually, you can leave this 'self.' out.

broken socket on IRIX64
56545 [ahoward@fs .] i don't know where to start with this... but IPSocket#addr is broken on

Reading and writing binary data from files
56549 [jdevries@pf ] I just started reading about Ruby, and decided to try to use it to write
56552 [jdevries@pf ] Posted too soon!  Just found pack and unpack under Array (not exactly
56556 [jean-francoi] ok

Tempfile warning message: "output left in <tempfile>"?
56550 [schuerig@ac ] From Tempfile I get the following warning message: "output left in

Narf: An end to suffering.
56553 [bruce@co ed ] This is just a "thanks" to Tom Clarke, Patrick May, and anyone else that's
56577 [patrick-may@] We appreciate your thanks.  Also remember to send us suggestions and

[FAQ] Defining <=>
56555 [cyclists@nc ] At Gavin's request here is a summary of my question and the answers I
+ 56557 [dblack@ca dl] I'm not sure this error message makes sense.  All you've discovered is
+ 56558 [Dave@Pr gm t] I have to say I disagree with this fairly strongly.
  56601 [gsinclair@so] These are good points, Dave (and David Black as well), and I do not disagree,
  + 56602 [Dave@Pr gm t] My main objection is that you remove flexibility from the future users
  + 56641 [tsiivola@cc ] The fact that there are several divergent views seems to point in the
    56646 [dblack@ca dl] To the extent that the discussion has revolved around the practice of
    56647 [decoux@mo lo] Well, you can remove it from the FAQ but you'll never stop ruby to do this
    + 56650 [dblack@ca dl] True, and it serves a purpose, but I wouldn't want to use that as a
    + 56653 [matz@ru y- a] But it based on whether object has "to_str" or not.  I know Ruby still
      + 56655 [dblack@ca dl] This made me take a second look at my to_str example....  In 1.6.7
      | 56676 [bob.news@gm ] coming from a bit different background (i.e. mainly java) i find this
      + 56656 [Dave@Pr gm t] Actually, File.open looks for a String, it just calls
        56657 [matz@ru y- a] It does.  Everything I say is based on 1.7 in general.  Sorry for

Thread problems
56559 [nemo@he lo r] I found that some old code that had once worked just sort of stopped
+ 56561 [harryo@zi .c] By default, if a thread raises an exception, it does not abort all the other
+ 56562 [austin@ha os] Thread.new do

Apps?
56563 [usenets@ny .] Is there any simple Photo Cataloging apps using Ruby and some RDBMS(mysql,

Modifying objects in place
56564 [tim@ba es id] How can I write a Foo.succ! method in my own class? When I try
56566 [aleksei.guze] self is a reference to the object(if the object is not of value-type). One

̣ͣͼԼԤεս
56565 [hakubin1604a] 

Ruby from Other Languages
56567 [martindemell] I've started a wiki page collecting features and packages from other

List of development issues?
56569 [brusch2@gm .] I can't find a list of issues which are under development in the newer

[ANN] Ruby-GNOME2 0.1
56570 [mutoh@hi hw ] What's Ruby-GNOME2?

[ANN] rbbr-0.1
56571 [mutoh@hi hw ] rbbr (RuBy BRowser) is an application to browse modules/classes

Modifying DATA_PTR - Is it safe?
56572 [cyclists@nc ] In a C extension, is it safe to change the value of the data element
56573 [matz@ru y- a] It will not cause any problem, if you process referenced C object
56579 [cyclists@nc ] Thanks, Matz!

How do I add numbers in C?
56574 [jim@fr ez .o] static VALUE
56575 [jim@fr ez .o] static VALUE
56576 [decoux@mo lo] Why you don't write

What does rb_num_coerce_bin(x, y) do?
56581 [jim@fr ez .o] I see this call in the ruby source
56583 [tsiivola@cc ] Quick check from the source makes it seem like it acts just like

Call For Papers for CodeCon 2003
56584 [james@ja es ] This is the Call For Papers for CodeCon 2003.

Ruby/PHP security
56585 [ted@da ac mm] Someone made a comment (I paraphrase) like "PHP can do it, but with complete insecurity", and opined that Ruby is more secure than PHP.
+ 56586 [nemo@he lo r] That was me.  No offense meant... in fact, I was complaining about Ruby at
+ 56587 [dido@im er u] The only reason I can think of why anyone would say that PHP is less
| 56598 [decoux@mo lo] ruby is not a P language
+ 56607 [patrick-may@] I think php has a lingering bad rep from the days of "submitted
+ 56612 [simon@si on ] Well-written PHP is precisely as secure as well-written Ruby; I'm not
  56613 [decoux@mo lo] Sometimes ruby just don't want

Eruby woes... bizarre behavior
56588 [sneu@ib p. r] Hey, does Eruby cache modules that you're using, somehow?  I'm
+ 56589 [tim@ba es id] If you're using mod_ruby, all your scripts run in the same interpreter, so a
+ 56590 [kentda@st d.] Do you use eruby with mod_ruby?
  56595 [ sz@sz sz hu] Mmm... I'm a beginner in mod_ruby, so why exactly is the above
  56597 [kentda@st d.] Apache usually runs more than one process for handling incoming
  + 56615 [sneu@ib p. r] Thank you everyone.  This gives me some ideas to work with.  You've been a
  + 57452 [usenets@ny .] So, how one get consistent response?

Ruby idom needed
56593 [rc@va ca er ] open(EMAIL, "<$EMAIL_FILE") or die "Failed to open $EMAIL_FILE";
+ 56594 [tim@ba es id] File.readlines("fred.ini"){...}
+ 56599 [rshaw1961@ya] h = {}
| 56622 [adamon@ma la] Thank you!  This is clear and still concise.  The other responses seem
| + 56623 [michael_s_ca] Well said; I found this to be the best balanced between rubyish and
| | 56625 [jim@fr ez .o] Hmmm...rubyish... that's awful close to rubish. :)
| | + 56627 [michael_s_ca] Maybe.  Is that good?
| | + 56631 [dblack@ca dl] I still intend some day to write a Ruby shell called "rubysh"
| |   56639 [hal9000@hy e] Hmm, sounds like a codefest idea... :)
| + 56624 [jim@fr ez .o] key, value = line.strip.split(/=/,2)
| | 56626 [jim@fr ez .o] Oops, should read...
| + 56629 [dblack@ca dl] Uh oh, I think I might be an obfuscation suspect :-) But please -- I
| | 56644 [rc@va ca er ] Thanks all for the suggestions - very interesting for a Ruby newbie!
| + 56642 [rshaw1961@ya] I have to come clean. I only did this implementation because I could not
+ 56600 [dblack@ca dl] 1.
| 56604 [billk@ct .c ] I like the above, but wondered it it leaves the file open?
| 56605 [decoux@mo lo] The file will be closed when it will be garbage collected.
| 56608 [billk@ct .c ] You again!!!!   ;-D
| + 56609 [Dave@Pr gm t] file = fopen(fname, mode);
| + 56611 [decoux@mo lo] no,
+ 56606 [ahoward@fs .] (IO.readlines 'foo').each {|line|  (hash ||= {}).store *(line.chomp.split '=')}
| 56610 [dblack@ca dl] You need to have the 'hash' variable be in scope already when you
+ 57539 [list@NO PA c] h = []

mass-widget
56596 [maurice.ulis] If youre interested with mass-widgets (handling from 1000 to

Re: Non-blocking TCPSocket.gets
56603 [stesch@no sp] What about select?

rubycentral.com is down.... [more]
56616 [loats205@ao ] rubycentral.com is down, i was wondering if anyone knew of a mirror to get the
56617 [andy@to ls e] rubyinstaller.sourceforge.net

Not supposed behaviour of Array.new(2,[])
56618 [gminick@un e] [[], []]
+ 56619 [dblack@ca dl] $ ri Array.new
| 56660 [gminick@un e] Thanks :)
+ 56620 [batsman.geo@] You create an array holding 2 references to the _same_ (empty) array.
+ 56634 [nemo@he lo r] Yeah.  I always wished there was a nice way to do that, like with blocks.
  56635 [billtj@z. lu] I think in 1.7.2 and later you can do just exactly like that.  A wish come
  + 56637 [nemo@he lo r] I think in 1.7.2 and later you can do just exactly like that.  A wish come
  | 56677 [billtj@z. lu] I think it is similar to the difference between text books and journal
  + 56663 [austin@ha os] I can confirm in Windows 1.7.3-6, particularly for the "triangular"

Problem with libruby.a
56621 [tom@po os ic] $ ruby -v -e 'print Digest::SHA1,"\n"'

Unit Testing in Ruby for the (Absolute) Novice
56628 [mwilson13@co] ...
+ 56630 [brian@co ln ] ...
| 56632 [david.naseby] uh . . .
| 56636 [nemo@he lo r] Go to http://www.rubygarden.org/ruby?UsingTestUnit
+ 56659 [billk@ct .c ] (The code examples contained therein, however, are Java, not
| 56671 [brian@co ln ] This looks promising.  I'll find myself a copy this week.  Thanks for
+ 56678 [mwilson13@co] Thank you for the very helpful comments, suggestions, stories and

Things That Newcomers to Ruby Should Know (11/24/02)
56633 [billtj@z. lu] This is the (approximately) monthly posting of this list.  I just added
56679 [billtj@z. lu] Based on some comments that I received, I slightly modified Items 9 and 11
+ 56680 [dcarrera@ma ] Why is that?  x++ and x-- are very convenient.  I sort of understand why
| 56682 [rando@ba bl ] I don't see it as that big of a deal. "very convenient"? How
| + 56683 [dcarrera@ma ] Okay, "very convenient" was a stupid way of putting it.  I like "x++"
| | 56689 [billtj@z. lu] I think this subject has been discussed extensively in the past.  One of
| | 56697 [dblack@ca dl] (1) ++ and -- are NOT reserved operator in Ruby.
| | + 56712 [billtj@z. lu] (deleted)
| | + 56854 [bulatz@in eg] the same applied to '<<'? :)
| + 56684 [simon@si on ] On an expression that would otherwise be three characters long, that's
| | + 56685 [Mark.Volkman] ...
| | + 56694 [gsinclair@so] And given that the concept of 'x++' is very rarely needed in a Ruby program,
| |   56695 [dcarrera@ma ] Regardless, is there a reason *not* to have '++'?
| |   + 56701 [gsinclair@so] program,
| |   | + 56705 [jim@fr ez .o] It's syntax sugar only,
| |   | + 56706 [hal9000@hy e] exactly what it looks like -- the equivalent of
| |   + 56722 [austin@ha os] It's applicable to a small subset of the total set of classes.
| |     + 56723 [tim@ba es id] This relates to my email a few minutes earlier about collect_with_index, but
| |     + 56725 [dcarrera@ma ] I don't follow that.  Why is it that I can do string.chomp! but it is not
| |       + 56726 [gsinclair@so] No.  Hopefully the following makes sense.
| |       | + 56729 [dcarrera@ma ] Thanks, I'm understanding more now.  I guess that the next logical
| |       | | + 56735 [gsinclair@so] It's for performance, mainly (exlusively?).  In Java, integers are fixed
| |       | | + 56738 [dblack@ca dl] You're not changing the letter 'a' itself; you're changing a string
| |       | |   + 56743 [gsinclair@so] Reminds me of the joke: 2^3 = 27, for sufficiently large values of 2.
| |       | |   + 56744 [helgaorg@ya ] So wouldn't it make send to have a somewhat global
| |       | |     + 56749 [austin@ha os] The difference is that 3 is an immediate value object. There is only
| |       | |     + 56762 [martindemell] Think of it in terms of levels of indirection. A variable is just a
| |       | |     + 56764 [hal9000@hy e] It's not bogus at all. It's just a simpler
| |       | |       56807 [helgaorg@ya ] OK... I get it... I understood your argument (although
| |       | |       56812 [billtj@z. lu] Let me try to clear things up.  *Theoretically*, it is not impossible to
| |       | |       56814 [dblack@ca dl] I think there's a point at which it's OK to say that something is a
| |       | |       56834 [billtj@z. lu] 1) In my opinion, it is really a consequence of Ruby implementation; for
| |       | |       56840 [Dave@Pr gm t] I believe it's a question of Ruby design, not implementation.
| |       | |       56844 [billtj@z. lu] Thanks a lot for the comprehensive explanation.  How about Bignums
| |       | |       56855 [Dave@Pr gm t] Same goes for Bignums (they also are not mutable). I'm not sure what
| |       | |       56938 [billtj@y. lu] I guess probably it is true that for now we have to put the implementation
| |       | |       + 56949 [Dave@Pr gm t] I'd be surprised if File was immutable :)
| |       | |       | 56964 [billtj@y. lu] Well, as you already read, different people gave different reasons why
| |       | |       | + 56999 [botp@de mo t] Very clearly said.
| |       | |       | + 57003 [matz@ru y- a] Numbers are immutable.  Partially because of performance.  Partially
| |       | |       + 57012 [bulatz@in eg] this list implicitly exists - there is a convenience that only methods
| |       | + 56747 [austin@ha os] irb(main):004:0> s = "Hello"
| |       | + 56765 [simon@si on ] Confusing implementation limitations and language design was Perl 5's big
| |       |   56771 [gsinclair@so] The above code merely demonstrates that String#chomp! doesn't modify 'self',
| |       |   56775 [simon@si on ] What I'm saying is that proof-by-current-implementation isn't a great way
| |       |   56784 [dblack@ca dl] But proof-by-current-implementation-of-other-languages can't be any
| |       + 56741 [billtj@z. lu] Gavin has given you some answers and concepts based on Ruby
| |       + 56746 [austin@ha os] Nope.
| |         56782 [dblack@ca dl] But wait -- see your next post :-)
| |         56785 [austin@ha os] In the case of an immediate object, what I said is correct. In the
| + 56687 [AntiATField_] 100%.
+ 56686 [Dave@Pr gm t] I'm afraid you can't store persistent references to the online FAQ
  56688 [billtj@z. lu] Then I will change the reference when the new format is available.  Just

list comprehension and default argument name
56638 [bulatz@in eg] 1. list comprehension
+ 56640 [matz@ru y- a] (0...n).map{|x|x*2}
+ 56664 [austin@ha os] Why not do this another way?
| 56852 [bulatz@in eg] only reason of my suggestions is compactness of FP-style code
| 56901 [austin@ha os] FP?
| + 56903 [tsiivola@cc ] Functional Programming
| + 56908 [lyle@us rs s] functional programming (think LISP).
+ 56691 [gsinclair@so] I proposed both of these 2-3 months ago and they were not popular.  I would now
  56692 [dblack@ca dl] That's been proposed and rejected; see
  56853 [bulatz@in eg] of course :)

ruby-dev summary 18811-18923
56643 [ttate@kt ja ] I present you a ruby-dev summary in these days.
+ 56645 [martindemell] What's the difference between this and String#include? ?
| 56649 [ttate@kt ja ] I proposed a method like str1.include?(str2,beg,n), which means that
| + 56763 [martindemell] Ah, okay, I see. I can think of places this would have been useful -
| | 56769 [gsinclair@so] I propose String#matches?(beg, n, str)
| + 56804 [matt@li ke .] I do not think this is necessarily a good idea, because indexing on a
+ 56651 [pbrannan@at ] What do you mean by "substituting"?
  + 56658 [billtj@z. lu] I agree with you, Paul.  I think this is fundamentally similar to my
  + 56662 [ttate@kt ja ] I means a substitution "@@var = val".
    56681 [pbrannan@at ] class Foo
    56704 [matz@ru y- a] Yes.
threads.html
top