183556-212105 subjects 183904-185113

[rdoc] horizontal lines not working
183692 [vjoel@pa h. ] RDoc's horizontal line feature seems to have broken recently (maybe
187089 [vjoel@pa h. ] (The problem only affects horiz lines in plain text files, not in .rb

Textmate Bundles for form_remote_tag shortcut
183694 [soren@ha ai ] Watching through the online videos of the flickr tutorial, I noticed
+ 183699 [gene.tani@gm] this may not be the answer, but i saw it on Oreilly's ruby site
| 183705 [soren@ha ai ] Thanks for the link that is a helpful cheatsheet of the default
+ 183757 [dan@da ko n.] You want syncPEOPLE on Rails.

cgi script send a bad image to the browser
183697 [metallourlan] I'd like to use a ruby script to generate an image (directed graph) and
+ 183700 [logancapaldo] Maybe you want to use the CGI class.
+ 183701 [logancapaldo] Actually forgot what i just said, you're doing this all wrong. src
  + 183708 [james_b@ne r] You might be able to us JavaScript to get a reference to the desired
  | 183767 [metallourlan] 1)The user insert some data in a field, than press a button
  | 183785 [james_b@ne r] See my previous response to your initial message
  | 183852 [metallourlan] I understand, thank you for your help.
  + 183766 [metallourlan] Thanks a lot!

from Python to Ruby in 10 seconds
183703 [john_sips_te] I think this subject might make for a very nice article in
183706 [logancapaldo] Everything is a reference to an object
+ 183707 [marcel@ve ni] Any object can be made immutable by freezing it.
+ 183726 [riko@de pa m] Having some object immutable allows some optimization otherwise not
| + 183729 [rampant@gm i] a += b is the same as a = a + b. So, (a + b) creates a new string, and
| | 183753 [riko@de pa m] Ok. Perfect: it makes sense even if in the first instance I found it
| + 183731 [logancapaldo] I'm sorry I made that sound more general than I meant. I meant _in
+ 183730 [dave@bu t. d] I find Logan's answers accurate and complete, except for one, which is a
  183733 [agorilla@gm ] I found this a bit confusing.  Maybe....
  183736 [dblack@wo bl] If I can join the word-tweaking sweepstakes:  I don't think attributes
  183738 [agorilla@gm ] Perhaps best said with "when you have no other methods that set/get @x"?
  183741 [dblack@wo bl] Perhaps, though I deliberately didn't qualify it, on the theory that

newbie question about mkmf and dir_config
183710 [ralphkon@ya ] Please help a beginner!  I'm trying to write my first c-extension, and I
183898 [nobu@ru y- a] dir_config('foo') enables --with-foo-dir option, which implies

Strange behaviour
183712 [jvalencia@lo] tigre@enigma tigre $ irb
+ 183717 [lukfugl@gm i] $ irb
| 183719 [jvalencia@lo] Oh thanks, i really had a misunderstood on that point.
+ 183721 [ruby@an hr p] This stems from a fundamental misunderstanding of how the default
+ 183722 [cyclists@nc ] The "events.default = []" statement establishes a default object to be

unexpected behavior of range.each (Newbie extreme)
183714 [bttman@bi tr] with r=(5..9), r.each{|num| print num,"\n"} behaves as expected.
+ 183716 [cyclists@nc ] It was done on purpose. Ranges want to be able to iterate from beginning
| + 183720 [wright_gary_] There have been several threads over the last few months
| + 183724 [bttman@bi tr] seems like an odd definition of "include" (and "each") and inconsistent
|   183748 [g_ogata@op u] str[2..-1]
+ 183725 [james.herdma] Hey Joe (Whatcha doin' with that gun in your hand? -- a little Jimi

Adding methods to a singleton dynamically
183723 [noone@no he ] I'm building a view hierarchy from a file, and I would like it to add getter
+ 183737 [dblack@wo bl] I get a syntax error on that; I think you need a semi-colon after
+ 183740 [dblack@wo bl] I just *know* there's a way to do this with inject... :-)  But
  183803 [noone@no he ] Thanks, that does the job.  I was a little unclear of how << worked but now I

windows messagebox example(s)
183734 [rtilley@vt e] This is probably documented somewhere, but I thought ruby win32
183752 [john-rubytal] <bunch of constants>
372136 [amittomer25@] but Gentlemen is there any to show this meassage box on client side??
372326 [cbciv@ya oo ] A couple of things.

[ANN] el4r-1.0.3 - EmacsLisp for Ruby
183735 [rubikitch@ru] El4r enables you to write Emacs programs in Ruby as well as in EmacsLisp.

[ANN] Agile Web Developement with Rails in Italian
183754 [riko@de pa m] I have recently seen the italian version of "Agile Web Developement with
183770 [davidw@de as] Yes, I saw that on http://www.libreriauniversitaria.it and was surprised
+ 183778 [riko@de pa m] Well, I'm quite happy about it...
| + 183786 [pit@ca it in] I know that unbit.it supports Rails.
| | 183816 [riko@de pa m] site5 too (and I have an hosting with them). But PHP is more widespread...
| | 183845 [raffaele.sal] and they get a cheap service...
| | 183856 [riko@de pa m] The Rails book? Definitively it's worth buying. Well, if you already
| + 183802 [davidw@de as] Searching for 'rails hosting' finds quite a few.  If you don't mind that
| | 183817 [riko@de pa m] Well, I quite said something when I meant something else. That is to say..
| + 183859 [surrender_it] well, an italian ruby community[1] existed for a while (since 2003 IIRC)
|   183865 [riko@de pa m] Unfortunately I live quite far from it. :(
+ 183792 [nshb@in mi .] Anyone know of some other Italian websites in general or companies
  + 183855 [nicholas_wie] HTH,
  + 183861 [surrender_it] I'm not sure what you mean by "offer it as a service" but I can tell you

Ruby equivalent for PHP's strtr?
183760 [rails@je oe ] function in PHP (and possibly other languages, I don't know). That is, I
183772 [dave@bu t. d] tr comes from Perl, where it has the meaning of PHP's three-argument version
+ 183886 [shugotenshi@] ri String#tr
+ 183967 [rails@je oe ] Thanks, exactly what I was looking for.

Latent semantic indexing, but for other languages than English ?
183761 [Nuralanur@ao] ...

mysql command line
183762 [chriswillis1] does anyone know how to delete databases/tables in mysql command line?
183764 [vanek@ac .n ] if you're referring to the mysql client program,
+ 183774 [chriswillis1] so does that actually DELETE it?
+ 183775 [chriswillis1] don't worry about that last one!
+ 183777 [chriswillis1] so then,
  183779 [dblack@wo bl] It drops the table if the table exists, without raising an error if it
  183806 [w3gat@nw ag ] It seems a ligit question to me especially since Ruby interfaces so

Re: Small regexp question
183763 [benjohn@fy h] Which is exactly what I was after, thanks.

FileTest.size > 2GB ?
183773 [kasten.m@gm ] I'm using "ruby 1.8.4 (2005-12-24) [i386-mswin32]" and I'm
183899 [nobu@ru y- a] mswin32 version doesn't have large file support yet.
183917 [Daniel.Berge] Yes, use win32-file, available on the RAA.
183977 [dave@bu t. d] Daniel, you are the hero of Ruby users on Windows.
183981 [Daniel.Berge] Heh, thanks. :)

Problem installing RMagick
183776 [ruby@an hr p] I am trying to install the RMagick gem under MacOS X (10.3 latest). I have

Mac OS X Intel 10.4.5 readline support
183787 [reevesg@po o] Does anyone know how to get readline support working for an Intel
183790 [daesan@gm il] Readline library is already there.  (It's not GNU's, I think it's
183853 [riko@de pa m] Yes, you are right.

[SOLVED] Problem installing RMagick
183789 [ruby@an hr p] } I am trying to install the RMagick gem under MacOS X (10.3 latest). I have
183799 [cyclists@nc ] xwindow.h is part of the X11 package, which should be on your 10.3

Ruby 1.8.4 One-Click Installer
183793 [greg.kujawa@] I just wanted to say good job for the folks responsible for the
183854 [riko@de pa m] Are we talking about Windows? Could you please post I link?
183867 [ml.chibbs@gm] The One-Click Ruby Installer 1.8.4 preview3 has been posted since Jan
183910 [riko@de pa m] Sigh.. I totally missed it. Sorry.

Re: Agile Web Developement with Rails in Italian
183794 [horndude77@g] I know this probably won't answer your question, but here's the page

Ruby 1.8.4 One-Click Installer
183795 [greg.kujawa@] I just wanted to say good job for the folks responsible for the

Re: String subclass method returns subclass - intentional feature
183796 [svolkov@co c] Thanks for references,

Re: abstract method in Ruby
183800 [google@er kv] You can't call them *abstract* methods if you implement them
+ 183919 [ara.t.howard] how interesting!
+ 183921 [coder68@ya o] A good portion of the GoF patterns rely on abstract methods (visitor,
  + 183936 [google@er kv] I'm not advocating these abstract methods in Ruby. On the
  + 183938 [ara.t.howard] i disagree strongly here.  check out these two snippets that i am working on
    + 183958 [halostatue@g] Okay, Ara. Why do these methods need to be abstract and specificallyhave code around them? IMO, the *same* question should be asked oftsort.rb. I think that, in both cases, the answer is the same: theydon't.
    | 183965 [ara.t.howard] you are perfectly correct.  however, i think we all know that there is a lot
    | 183978 [logancapaldo] ...
    | 183994 [lukfugl@gm i] Umm, except, no. Maybe if we used Erik's "allocation-time checking"
    + 183961 [avdi.grimm@g] The question is, why use either of those methods?  Why not just note
    + 183962 [coder68@ya o] I still prefer the "full on type ducking" with a readable comment in the
    + 184015 [vjoel@pa h. ] rdoc -A abstract_method=ABSTRACT
      184074 [jim@we ri hh] I've been following the discussion on abstract method declaration with
      + 184077 [james@gr yp ] Priceless.
      + 184078 [pit@ca it in] LOL!!! Very nice! You should post this to the TDD mailing list.
      | 184081 [simon.kroege] *g*
      + 184088 [benjohn@fy h] It would be preferable I think, if a more helpful error message were
      | + 184089 [dblack@wo bl] I don't think Jim is being flippant at all.  He's provided a fantastic
      | + 184091 [jim@we ri hh] Agreed.  The unit test only specifies that the method name should be
      + 184108 [vjoel@pa h. ] class A

array element access
183801 [tomas_fische] I've got an array a= [1,2,3,4,5,6] and want to access each second
+ 183805 [dharple@ge e] require 'enumerator'
| + 183810 [cyclists@nc ] enumerator is handy but it seems a bit like overkill for a task that can
| + 183812 [fugalh@xm ss] map , = (1..10).partition{|i| i%2==0}
| + 183813 [w_a_x_man@ya] f=1
+ 183807 [hhausman@gm ] a = [1,2,3,4,5,6]
+ 183811 [farrel.lifso] array.inject(false) do |alternate,element|
+ 183818 [luc@ho k- on] irb(main):001:0> a = [1,2,3,4,5,6]
| 183822 [adam.shelly@] irb(main):012:0> a=[1,1,2,2,3,3,4,5]
| 183851 [luc@ho k- on] Yep, good catch.
+ 183821 [ara.t.howard] a = [1, 2, 3, 4, 5, 6]
+ 183997 [noone@no he ] I've always been intrigued by creating a generalized enumeration system.  Have
  184001 [dblack@wo bl] I'm not sure why, but to my eye this has always looked somewhat
  184002 [noone@no he ] file.each_byte.with_index.collect { |b, i| b + 1 }
  184013 [dblack@wo bl] There's still something I don't like about using method-chaining

freeze and hash
183819 [uval@rz un -] irb(main):069:0* a = Hash.new([])
+ 183826 [cmills@fr es] Try
+ 183828 [cyclists@nc ] Freezing the hash doesn't freeze the array that is its default value

Rinda not working through the network - what's wrong?
183820 [pgquiles@el ] I have host A (IP and host B (IP, both of them Linux

alias_method 'stickiness'
183825 [ara.t.howard] any idea if this behaviour is intended or not?
183833 [vjoel@pa h. ] Unfortunately (?) what this^^^ does is define run to be a copy of the
183836 [ara.t.howard] doh!  yup - yer right.  i like my 'anonym' method more and more.  perhaps an
183972 [vjoel@pa h. ] I've just gotten used to using alias *only* for metaprogramming, and not
183982 [ara.t.howard] i like that.  what do you think about

[ANN] abstract.rb 1.0.0 release (Re: abstract method in Ruby)
183830 [kwa@ku at -l] I released abstract.rb 1.0.0.

Array#inject with hash as initial, unexpected error
183831 [matthew.moss] (On Mac OS X 10.4.5, Ruby 1.8.4)
183832 [trevor@pr to] Hey Matthew,
183840 [matthew.moss] Okay, I feel silly now.  Thanks for the reminder on basic assignment

Init Script Installer
183835 [zdennis@mk e] I've got a few scripts which need to run as system daemons. For a while
183915 [zdennis@mk e] Checking for feedback this morning on this thread I see that my post doesn't make a whole lot sense. Perhaps a rephrase will help
183940 [ezmobius@gm ] Zach-
183953 [zdennis@mk e] Absolutely. I just didn't want to post anything *yet* until I got some
183960 [mercan01@gm ] ...

[Quiz 70 Solution] -- Using Amb
183846 [jim@we ri hh] The Amb library is part of the continuations talk that Chad and I gave
183848 [jim@we ri hh] Oops, typo!

What's the best way to split this kind of string?
183847 [sam.s.kong@g] I'm trying to make a routine to make a Morris Number Sequence.
+ 183849 [jim@we ri hh] "111223133".scan(/1+|2+|3+|4+|5+|6+|7+|8+|9+|0+/)
+ 183850 [rossrt@ro co] s.scan(/(\d)(\1*)/).map! { |e| e.join }
| + 183864 [thiago.arrai] Hmm.... Clever
| + 183951 [ajohnson@cp ] s.scan(/((.)\2*)/).transpose[0]
+ 183858 [w_a_x_man@ya] "111223133".scan(/(.)(\1*)/).map{|x|x.join}

Ruby application
183860 [benjohn@fy h] I'm after some general advice about creating a Ruby application that
183862 [farrel.lifso] ...
183889 [shugotenshi@] A lot of Ruby applications will come with a setup.rb that will install

[soap4r] how to get the soap stream from a client ?
183863 [com.descasof] With soap4r, I send a soap request to a server, but I would like to see my

The benefits of tail recursion
183866 [interfecus@g] I thought I'd share a useful little trick with the list. I've put
+ 183868 [interfecus@g] Sorry guys, I have a patch already. After the line
| 183945 [pbattley@gm ] Very nice. However, I couldn't run the normal recursed fibonacci test
+ 183946 [vanek@ac .n ] do you know whether it's possible to do Ackermann with this?
+ 183971 [pit@ca it in] If you're interested, see ruby-talk:145593 for an implementation with
| 183975 [headius@he d] ...
| 183995 [ajohnson@cp ] def foo(n)
+ 183974 [headius@he d] ...

Extension module: Why does object get GCed?
183871 [pseudoman4@y] I try to write an exentension module with containing the following
183875 [decoux@mo lo] at the end of the function, this address is not valid and probably will
183882 [pseudoman4@y] i know that ruby_obj goes out of scope when the function exit. But that
183881 [pseudoman4@y] i know that ruby_obj goes out of scope when the function exit. But that
183887 [decoux@mo lo] After the function exit anything can be put at this address. This mean
183905 [pseudoman4@y] I tried adding ruby_obj to a stl vector. This doesn't work and the
183907 [decoux@mo lo] First, what are you trying to do ?
183912 [pseudoman4@y] Yeah!

word_wrap method for String?
183873 [progressions] For a text adventure program I'm working on I needed a method to word
+ 183874 [ruby@cr zy e] def wrap(wrap_len=78)
| 183884 [shugotenshi@] class String
+ 183876 [vanek@ac .n ] width = 11
| + 183879 [progressions] When I was writing that I just KNEW there must be some one-line solution
| | 183891 [vanek@ac .n ] everthing old is new again.
| | 183893 [progressions] It's my first time using the profiler, but if I'm reading this
| | 183895 [vanek@ac .n ] yahtzee!
| + 183914 [w_a_x_man@ya] When you modded, you didn't notice that 8 was 2 less than the width.
+ 183901 [dharple@ge e] This one is taken from facets[1]. I use it to wrap lines in TextMate.

Quickest way to do this string op.
183878 [eastcoastcod] What's the quickest way to turn "BOCA RATON" into "Boca Raton"?
+ 183880 [angus@qu va ] "BOCA RATON".replace "Boca Raton" # :-P
| 183883 [simon.kroege] "BOCA RATON".gsub(/\w+/){|w| w.capitalize}
| 183885 [ppalmer@na i] "BOCA RATON".capitalize
| + 183890 [ppalmer@na i] Answer : No you can't. Please ignore me ;)
| | 183900 [james_b@ne r] Do we ignore the message asking us to ignore you?
| + 183896 [heimdall@un ] irb(main):001:0> "BOCA RATON".capitalize
| + 183952 [rhkramer@gm ] Nope!  (That gives => "Boca raton").
+ 183897 [heimdall@un ] irb(main):006:0> str = "BOCA RATON"
+ 183986 [poeniprinter] "BOCA RATON".split(' ').collect do |name| name.capitalize end.join(' ')

RAA <=> Gem
183888 [info@jo na e] What is the best way to

RubyCorner a meeting place for the Ruby blogging community
183902 [anibalrojas@] After spending some of our spare time (a software developer having
183909 [lyle.johnson] Let me begin by saying I'm glad whenever anyone wants to contribute
183976 [anibalrojas@] Lyle,
183991 [james_b@ne r] How about PHP? I believe it powers RubyForge.org.  Or is it Perl?
184014 [michael.gors] I really like the idea: it allows all of us to contribute, and it
184378 [anibalrojas@] James,