334717-335983 subjects 335156-378468

Re: Initial release of gem_grep, a gem command plugin
334954 [gabriel.horn] Glad you like it. :) The above install should work for anyone.
335019 [gabriel.horn] For the rubyforge inclined, you can try this plugin with: sudo gem
335021 [ryand-ruby@z] YAY! thanks!

ARGV, STDIN and gets
334959 [joe@jo ti y.] I am running into an issue where I have a script that takes two command
+ 334961 [nobu@ru y- a] Kernel#gets is not a method to read from stdin.
| 366987 [prakblr@ya o] Thanks Nobuyoshi!
| 383725 [daniel_anton] var2 = ARGV[1].clone
| 383734 [shortcutter@] Why do you clone when the next thing that you do is clearing ARGV?
+ 334964 [vjoel@pa h. ] Kernel#gets reads from ARGF, which, if there's anything in ARGV, is read
  334966 [joe@jo ti y.] ARGV.shift works perfectly, should have thought of that.

Re: Finding Quiz Responses (#200)
334969 [lcowell@gm i] #!/usr/bin/env ruby

rake variables
334978 [jeff@sc wa c] (1) Is there any way to set rake options from the within the Rakefile,
+ 335148 [jeff@sc wa c] Can anyone recommend a more appropriate forum for these questions?
+ 336266 [jeff@sc wa c] The short answer to this is no.  The long answer is that you can use
  337478 [jeff@sc wa c] Thank you, Jim.

FileUtils cp_r
334980 [revathy.p@an] i want to copy a folder recursively
335005 [jona.hunt777] Maybe you can use

Methods and blocks - not that clear when blocks passed into
334986 [staylor@su e] Coming from other programming languages, notably Basic based, a little
+ 334990 [phlip2005@gm] def method(args)
| 334991 [staylor@su e] Thanks.  I'll look into the 'longcut' version, at least that appears, on
| 334992 [shortcutter@] It used to be a bit slower though.  I haven't done any measurements with
| 334993 [shortcutter@] remember.guy do |as, often| as.you_can - without end
| 334994 [phlip2005@gm] Does it cover this situation?
| + 334997 [shortcutter@] def block_test
| + 335125 [b.candler@po] Given that you're concerned in testing the number of times the block is
+ 335025 [ninja@sl ph ] If your question is how to tell whether a method accepts a block, the answer

biggest number
334988 [spamalo@gm i] I'm learning ruby, and I want to know if it is any way to know the
+ 334989 [charles.nutt] Float is a standard 64-bit IEEE floating point value. There are several
+ 335008 [vjoel@pa h. ] irb(main):005:0> (2**30).class

Re: Methods and blocks - not that clear when blocks passed i
334995 [bbxx789_05ss] def meth1

[ANN] Rack 1.0, a modular Ruby webserver interface
334996 [chneukirchen] Today we are proud to release Rack 1.0, which was close to almost be
+ 335002 [charles.nutt] Nick Sieger pointed me to your implementation of RewindableInput, and I
| 335014 [charles.nutt] FWIW, I was pointed to the discussion about middleware, which explains
+ 335007 [james.britt@] Rack should be code-named Shaft, because it's a *bad* mutha ...
+ 335033 [martindemell] Congrats on the 1.0 release :)

(debian,eclipse) modify the code of a window created with glade
334998 [lolveley@ya ] I would like to create a window with glade, import it in a ruby project,

Running JRuby behind an Apache server
334999 [charles.nutt] In case anyone's interested, I've started a simple HOWTO blog post for
335000 [shortcutter@] Do you have any experience with integration in Java based webservers
335001 [charles.nutt] For Apache? Yeah, there's what used to be called mod_jk, which I believe
335003 [shortcutter@] No no, I meant, using Tomcat, Jetty or the like with JRuby.  Sorry, the
335004 [charles.nutt] Well, they both work great as far as I know. In Tomcat's case, you would

[ANN] rake-compiler 0.5.0 Released
335006 [luislavena@g] rake-compiler version 0.5.0 has been released!

Parsing a nested set another way
335013 [aneeley@gm i] I am trying to render a nested set a certain way. I have code that
335018 [ian.hobson@n] Your source appears to be eruby (which I don't know), so I will limit

anonymous class, body defined by Proc.new vs. lambda
335015 [thomas@fa n.] f = Proc.new{}; Class.new(&f)
+ 335016 [phlip2005@gm] Just a guess does this fix it?
+ 335017 [ryand-ruby@z] the error message tells you why. it isn't hard to figure out what the

Concurrent GEM for Ruby ?
335020 [ladd.james@g] I'm wondering if anyone would like to see a Concurrent Library for
+ 335022 [tony@me io .] There are quite a few libraries that provide concurrency strategies already
| 335023 [ladd.james@g] dy
| + 335026 [ladd.james@g] Not sure why I didnt find this the other day
| + 335046 [tony@me io .] Well, I'm not sure what you're after.  Two libraries for actor-based
|   335164 [default@sp r] If you are looking for a process pool or similar,
+ 335027 [sureshkkgvr@] I'm wondering if anyone would like to see a Concurrent Library for
+ 335034 [shortcutter@] Some building blocks are part of the standard library already: Mutex,

passing password to mysql
335028 [stephanwehne] I would like to use Ruby to open a mysql prompt for the user. The
335029 [phlip2005@gm] Grab ActiveRecord (part of Rails, ob-vossly), and write its database.yml file.
335030 [stephanwehne] Ok thanks; however I find the mysql prompt sometimes easier and faster.
335031 [phlip2005@gm] If you mean raw SQL statements, just .execute() them. Otherwise, how does the
335042 [stephanwehne] Yes, I am aware of using connection.execute(..), select_all(...), etc.

Overriding eql? and hash
335035 [elchesa@ho m] I am working in an application and I need to store my own objects in
335037 [sepp2k@go gl] If two strings are equal except for case your eql? method will return true.Or
335045 [elchesa@ho m] It works perfectly.

vit-ruby.ico (icon file) released
335036 [rubyist@mo p] I have released vit-ruby.ico. It an Windows icon file which made from Ruby

vit-ruby.ico (icon file) released
335038 [rubyist@mo p] I have released vit-ruby.ico. It an Windows icon file which made from Ruby

Ruby Use
335041 [Nada@no he e] I'm JUST beginning my study of Ruby, and I still have a really long way to
+ 335043 [sureshkkgvr@] Posted by jwkh (Guest) on 26.04.2009 15:15
+ 335044 [bosko.ivanis] Check books: Ruby for System Administration and Everyday Scripting
+ 335101 [adam.oddfell] I'm using Ruby for game development, myself. Performance may not be that
+ 335226 [Nada@no he e] Thanks, all, for your responses.

Using method missing to create getters and setters
335047 [crofty_james] I am trying to create a model (BatchExternalBooking) which has the
+ 335049 [robert.dober] Hmm seems a little confusing with the $1 in the evals and $2 is
+ 335052 [TimHunter@nc] Two thoughts. First, why not use an array? Then
+ 335053 [shortcutter@] You might rather want to use class_eval here.
| + 335055 [crofty_james] The reason that I am trying to use methods/attributes to store the
| | 335124 [b.candler@po] I believe that ostruct by itself will do the job, or you can use
| + 335056 [rick.denatal] No instance_eval works just as well for sending attr_accessor to a
|   335119 [shortcutter@] I did not want to state that instance_eval is the issue.  Sorry for
+ 335211 [ninja@sl ph ] Why the string eval?
  335279 [robert.dober] ck

Retrieving the testcase name in class inheriting unit testca
335048 [nlkmr36@gm i] How can i retrieve the testcase name, while running the testcases of the
335051 [shortcutter@] Do you mean like
335181 [bhaskar.sund] def test_simple

gem tcp port?
335050 [stevegooberm] I'm using ruby on a machine behind a severely locked down firewall
335064 [aaron@te de ] Port 80
335207 [drbrain@se m] And, it only downloads via port 80, it doesn't open any ports by

Newbie help, please
335054 [bigfootm@mi ] I am a complete novice to programming. I have chosen Ruby as my first
+ 335057 [rick.denatal] Probably the most idiomatic way is to use string interpolation.
+ 335058 [bigfootm@mi ] Of course after I post, I figure out the solution!
  + 335059 [whitequark@w] You cannot simply add strings and numbers together; you must convert
  + 335212 [ninja@sl ph ] As others have said, the best way is most likely string interpolation. I'd do

How to parse a "line"?
335060 [huangshuo.9@] I have a line, the format is like this
335061 [james@gr yp ] If you just need to bust up the words via the spaces, this should
335062 [robert.dober] This is another opportunity to show Ruby's versatile style, e.g. functional
335069 [caduceass@gm] I like...
335070 [caduceass@gm] Oops...
335071 [huangshuo.9@] Thank you Todd, but the number of the keywords are dynamic.
+ 335075 [bbxx789_05ss] strs = ["6 toyota bmw honda GM Ford", "3 tokyo newyork paris"]
+ 335084 [james@gr yp ] Did you try our code?  All of our solutions work for all examples =20
+ 335085 [caduceass@gm] If you look closely, you'll see that James' method grabs everything
  + 335087 [caduceass@gm] You know after looking at your original post, maybe you are trying to
  | 335088 [caduceass@gm] It's late and I'm golfing with myself.  Apologies to the list for this
  | 335091 [huangshuo.9@] it works!
  | 335092 [caduceass@gm] Using 1.9.1.  Sorry I didn't mention that.  I haven't been following
  + 335089 [huangshuo.9@] Oh my god.....
  + 335096 [bbxx789_05ss] Note that you made ruby go through the laborious chore of shifting every
  | 335098 [caduceass@gm] Is that really what happens?  I thought it just reassigned a starting
  | 335099 [caduceass@gm] Let me rephrase.  What is different on the underlying structure with
  | + 335107 [list.push@gm] If it shifts everything, it sure does it fast :)
  | + 335109 [bbxx789_05ss] 1)
  |   335113 [caduceass@gm] I looked at an old thread where Bob Hutchinson piped in about
  |   335115 [huangshuo.9@] h = {}
  |   335116 [caduceass@gm] Maybe we don't know exactly what it is you are trying to do.  strs
  |   335142 [huangshuo.9@] OK, what I want to do is this, let me describe by c
  |   335145 [mark@th ma z] Is that all you want to do? Once you have the cities,
  + 335206 [caduceass@gm] That looks like I'm buoying my idea.  I think any single one of these

Iconv (& sqlite) problems on Leopard: Ruby 1.9.1/Rails 2.3.2
335063 [jtbandes@gm ] I have both a PPC Mac and an Intel Mac, and I recently installed Ruby
335066 [james@gr yp ] My leading guess would be that your path is different on the two =20

JRuby constructor issue or just me?
335065 [ast@at wn ey] I can't figure out why this doesn't work.  I need to do this because I'm
+ 335079 [charles.nutt] Constructors can be a little fiddly from within a Ruby class that
| 335135 [ast@at wn ey] Thanks.  That's exactly the behavior I wanted.  I wanted to call the empty constructor explicitly.
| 335192 [charles.nutt] Yes, we did make a modification in JRuby 1.1.5 or so to allow
| 335375 [ast@at wn ey] Sounds good.  Hopefully the changing of the guard won't interfere with
| 335379 [charles.nutt] No specific docs, but if you check out JRuby (on github, jruby user's
+ 335100 [Gennady.Byst] In Ruby, "super()" is different from just "super". The former will invoke a=
+ 335104 [nicksieger@g] Your initialize method requires at least a "count" parameter, but

Re: Iconv (& sqlite) problems on Leopard: Ruby 1.9.1/Rails 2
335067 [jtbandes@gm ] The paths are about the same, both having /usr/local/bin:/usr/bin:/bin

Block Style
335068 [james@gr yp ] I hate to be the guy to start another { =85 } vs. do =85 end thread, but =
+ 335072 [rick.denatal] I have
| + 335086 [james@gr yp ] Interesting.  I've been using Amalgalite a lot lately.  It definitely
| + 335137 [lojicdotcom@] FYI - looks like you have an extra trailing paren here in the last
|   335140 [rick.denatal] Yeah that was a cut and past typo in the sequence of examples.
+ 335183 [sean.ohalpin] I have
  + 335187 [vjoel@pa h. ] Actually, the return value of #tap is different from the return value of
  | 335223 [sean.ohalpin] the
  | 335224 [vjoel@pa h. ] No, I'm puzzled most of the time :)
  | 335227 [sean.ohalpin] I guess it's in the eye of the beholder but
  + 335190 [robert.dober] I have adapted a very simple rule for a long time now, if I use the
  | 335205 [shortcutter@] One liner and multi liner is actually exclusive, which cannot be said of
  | 335215 [james@gr yp ] whatevery.map do |e|
  | + 335242 [shortcutter@] Well, I personally do not find that "less pretty" - but this lies in
  | + 335249 [robert.dober] ...and being easier it just does not convey any additional information.
  + 335221 [dblack@ru yp] Though not in irb. (And, preferably, not anywhere, but that's probably a

Deleting numbers in array
335073 [ds_unsane@ho] I'm new to Ruby and unsure how to delete numbers in an array. I have an
+ 335074 [dblack@ru yp] You're pretty much going to have to convert the numbers to strings. For
| 335077 [ds_unsane@ho] Wow! Ruby is so good! I'm unsure of how to do this final step too. If
| + 335081 [ruby-bucket@] nums.delete_if {|x| !x.to_s.include? '1'}
| | 335082 [ds_unsane@ho] Amazing! I tried to do this in C++ and it was a nightmare. Ruby is
| | 335090 [bbxx789_05ss] #include <iostream>
| | 335095 [bbxx789_05ss] Posted via http://www.ruby-forum.com/.
| + 335083 [bbxx789_05ss] arr = [51, 52, 20, 36, 79]
|   335093 [bbxx789_05ss] lol.  I screwed that up!  I guess it was easier for me in C++ than ruby.
|   335130 [dblack@ru yp] You're working much too hard :-) I'm not sure whether the OP only cares
+ 335078 [ruby-bucket@] Try this.
  335080 [ds_unsane@ho] Hmmm didn't seem to work. I'm just trying to remove numbers that don't

Creating directory and its files
335094 [huangshuo.9@] I want to create a directory and create files under it.
335102 [bbxx789_05ss] How about posting what you want to do if the directory already exists?
335106 [huangshuo.9@] You mention me it's safe to create a directory with date version
335111 [bbxx789_05ss] require 'date'

Unable to handle javascript popup
335097 [parikshit.be] i am trying to handle javascript popup dialog box, but not being very
335162 [kranthicu@gm] if you can be more specific about your problem that would help a lot.

append .cvs behind an array value
335103 [huangshuo.9@] I want to add ".cvs" at the end of a name,and use the following
335108 [caduceass@gm] puts name.class
335110 [huangshuo.9@] It's an arry object.
335112 [bbxx789_05ss] ..and how do you step through an array?
335114 [huangshuo.9@] arrayname.each do |name|

Helo on optparse
335105 [revathy.p@an] in that for copying i have implemented like below
335120 [shortcutter@] That actually seems to be not a question about OptionParser but rather
335121 [revathy.p@an] thanks for the reply...
+ 335122 [revathy.p@an] pls reply...i may sound dump
| 335129 [bbxx789_05ss] The OptionParser module is so poorly documented it should be stricken
| 335141 [shortcutter@] While the documentation of OptionParser is not perfect it is sufficient IMH=
+ 335133 [nobu@ru y- a] $ ruby -roptparse -e 'ARGV.options{|opts|opts.separator "---";opts.separator "appears as is";opts.parse!}' -- -h

Can't read Yaml for domain type
335123 [ganeshgirase] I have one yaml file "content.yml" which has content,
335186 [vjoel@pa h. ] There should be some code that defines the DBClass type for YAML (maybe

Join as Remisser of Karvy
335126 [tekfortune@g] Karvy is an established stock broking firm with a strong customer base

Generating a report from an ugly log file
335134 [srijayanth@g] I have the following problem.
335189 [mark@th ma z] s.
335193 [srijayanth@g] Thanks.

Market Basket Algorithm - Direct Hashing and Pruning
335136 [arthur@pi op] I am going to implement an algorithm for Market Basket Algorithm upon

Re: optparse  how to emulate the "--" pseudo-flag?
335139 [Maurice.Diam] How can we add the classical "--" pseudo-option which says not
+ 335143 [shortcutter@] ["-x", "a", "b"]
+ 335146 [jameskilton@] OptParse already handles this and has for some time.
  335648 [Maurice.Diam] Thanks Jason and Robert, it works!
  335652 [nobu@ru y- a] They are different.  At least, the latter is being maintained.

Re: Itinerary for a Traveling Salesman (#142)
335144 [arthur@pi op] I think it is a super useful post for me, as I am finding TSP solution
335232 [cwdinfo@gm i] I'd like to be optimistic, but this is not a problem that has
335411 [rick.denatal] Rick DeNatale

Gui library suggestion based on my needs?
335151 [rps@sa as co] Any recommendation on which 'gui' package I should use to build a ruby
+ 335154 [robert.dober] that is a no anyway, unless somebody comes up with a thingy I do not
+ 335155 [martindemell] If you don't mind the Swing look and feel, JRuby + Monkeybars looks
| 335157 [rps@sa as co] Thanks for the ideas so far.
| + 335158 [martindemell] If you want to stick with a C-based solution, I've recently had good
| | 335184 [robert.dober] excellent thinking, I forgot about Shoes, why???? ;)
| + 335185 [james.britt@] Any particular reason?
|   335196 [rps@sa as co] I did a good deal of work with Swing a little while back and tried all
|   335237 [logustus@gm ] That's totally understandable. I'd be more concerned with distributing
|   335266 [rps@sa as co] Logan
+ 335175 [aff28@de et ] I think wxRuby meets all your requirements, and would be worth
  + 335201 [rps@sa as co] Alex
  | 335209 [alex@de et m] A lot of the stuff I put in wxSugar originally is now in core wxRuby.
  + 335582 [rps@sa as co] Alex, I've gotten around to digging deeper and see that this source file