229779-231176 subjects 230195-231634

Trapping error not caught by rescue Exception -- How to?
229965 [RichardDummy] The fourth data line in the program below hangs rather than submitting
229966 [danfinnie@op] Ruby doesn't hang when I run that code.
229970 [RichardDummy] Thanks for your results.  I suspect you were running on Uni*.  I was

Re: [RANT] does Ruby generate WINDOWS and dialog boxes?
229969 [david@va ln ] Some of us have to "sell" software, at least to managers - then it matter=
+ 229971 [vshepelev@im] I had. And it was good words. Really worth to be remembered and quoted.
+ 229972 [ttmrichter@g] I did.  And applauded most of the way through it.  Programmers have a

Compiling Ruby programs...
229974 [rubyaddict@h] I am wondering if someone can point me to a Ruby compiler that converts
229981 [james.britt@] Try searching the mailing list archives; there have been numerous

rubygem setup.rb failing
229978 [michael@we l] I'm having to setup multiple machines, and I've got a new problem (at
+ 229982 [james.britt@] I've installed ruby and rubygems on Kubuntu recently.  No links handy
+ 229983 [ara.t.howard] i'm guessing you have more that one ruby installs on your system and compiled
+ 229989 [akulbe@gm il] Cheers,

dsl/library for text interaction?
229984 [banshee@ba s] I've been doing a fair amount of work with Asterisk lately.  It's got a
+ 230002 [ara.t.howard] you mean ruby?
+ 230016 [james@gr yp ] Perhaps you could use a parser generator?
+ 230019 [gregory.t.br] If the data is regular enough, RedNails might do the trick

hpricot problem
229993 [henryj@pa ad] Not sure where to send this, sorry if it's not the right place...
230012 [RubyTalk@gm ] I have found that saved pages from Firefox are different then the html
230026 [peter@ru yr ] Of course they are. If you save a page from Firefox, (or IE, or just any
230120 [why@ru y- an] Well, but, I'd actually like to get Hpricot's parser to be close to Firefox's.
230138 [peter@ru yr ] Wow. Wow. Wow.

hpricot problem
229994 [henryj@pa ad] ...
+ 229995 [nospam@no it] You have created a new thread, and you have not attached any prior text.
| + 229998 [peter@ru yr ] Why should it be complicated? What fuss? Who needs few lines?   With the
| | + 230064 [nospam@no it] / ...
| | | 230124 [henryj@pa ad] ...
| | + 230123 [henryj@pa ad] Maybe I'm going mad but there is no img tag in the sample code. I am
| + 230122 [henryj@pa ad] Paul,
|   230146 [cdcarter@gm ] Henry, There was some just a few days ago who had a problem with using
+ 230000 [peter@ru yr ] What are you trying to do? Matching that comment? Or matching the text
+ 230121 [why@ru y- an] Great stuff!  Thankyou.  This is going to be a fun one to work on, so I'll get
  230135 [henryj@pa ad] It's not a big deal. Like I said, it's easy to work around. Just

Why the resutls are different
230003 [chen_li3@ya ] I try to understand the concept of variable scopes. I define two classes
+ 230005 [TimHunter@nc] Code in class definitions, such as your "puts" statement, is executed
| 230027 [danfinnie@op] Also, before you get into the habit of doing that (see the quote), it's
| + 230059 [chen_li3@ya ] Thanks,
| + 230061 [dblack@wo bl] puts "This is the name " + name
+ 230006 [vshepelev@im] Li Chen
  230015 [chen_li3@ya ] Thank you all for the quick response.

Grabbing data off a webpage
230008 [Bil.Kleb@NA ] OK, so I haven't done this in years.
+ 230013 [gregory.t.br] I've actually been needing to do something like this for work and
| 230014 [gregory.t.br] Yuck, seems to have made a mess of the text output.
+ 230030 [peter@ru yr ] require 'rubygems'
| 230049 [gregory.t.br] clever solution peter.
| 230050 [peter@ru yr ] Thx for the pointer Gregory, I did not know about Ruport yet - seems
| 230052 [gregory.t.br] It might be overkill if all you needed was struct like access to your
+ 230031 [RubyTalk@gm ] Its slow and messy, but i did it in 5 mins
+ 230071 [w_a_x_man@ya] require 'net/http'
| 230095 [gregory.t.br] require "open-uri"
| 230096 [gregory.t.br] whoops... need the http://
+ 230150 [Bil.Kleb@NA ] Thanks everyone; I'm on my way now.

Ruby IDE
230011 [adaworks@sb ] I am new to Ruby, but I have used a lot of other
+ 230018 [david@va ln ] Here we go again.
+ 230022 [caldridge@gm] All I use is SCiTE and I've been writing ruby code for nearly two years.
+ 230023 [ssmoot@gm il] Some more IDEs for Windows are: ArachnoRuby, Komodo, Eclipse with Ruby
| 230028 [david@va ln ] Like integrated unit test support.
| + 230035 [mushfeq.khan] ...
| | 230046 [david@va ln ] gs
| + 230051 [allergic-to-] Not to mention the ability to get a comprehensive view of the structure of
| + 230068 [ssmoot@gm il] Meh? What's a couple keystrokes? Does that really help you be more
|   230076 [david@va ln ] Yes. I've switched from Eclipse and 250 dollars + VAT to IDEA precisely
|   + 230083 [wilsonb@gm i] Find you a better place to work?
|   | 230214 [ snk@gn .o g] You might want to try VimMate (http://vimmate.rubyforge.org/). It adds
|   | 230215 [ snk@gn .o g] I forgot to mention _my_ wmii configuration,
|   | 230236 [darkintent@g] ...
|   + 230117 [gregory.t.br] umm... you can use ri directly from IRb pretty easily.
+ 230043 [huw@DE TH SB] You don't mention if you are a Visual Studio user. If so, you may want to
+ 230074 [delta11NOSPA] Try
| 230114 [adaworks@sb ] Actually, I tried FreeRide, but it doesn't seem to work.
| + 230160 [ayaz@de .s a] Perhaps the environment PATH variable does not contain a path to the ruby
| + 230163 [mikewoodhous] In SciTE save your scripts with the "rbw" extension, which seems (I
|   230209 [darkintent@g] ...
+ 230270 [cdcarter@gm ] after following this discussion for a few days, I decided to do a
+ 230274 [jussij@ze se] It does Ruby syntax highlighting, code folding, class browsing,
  233580 [svkohli@gm i] You can get all of the above and more (like integrated RubyDocs) with

why  private is not private
230017 [chen_li3@ya ] I add a private method to class Object and try to call it from outside
230020 [david@va ln ] The toplevel execution context is also an instance of Object. You're
230033 [pergesu@gm i] Just to expand on David's point a little...
+ 230038 [chen_li3@ya ] Thanks a lot, Pat. I am much clear about the concept now.
| 231125 [nightphotos@] To add to what others have replied, "private" in Ruby
| 231164 [chen_li3@ya ] Thank you for the input and Merry X-mas to all,
+ 230041 [chen_li3@ya ] One more question: in my previouse script what does self really refer
  + 230047 [david@va ln ] irb(main):001:0> self
  + 230048 [TimHunter@nc] Ask Ruby...

Fwd: Please Forward: Ruby Quiz Submission
230021 [james@gr yp ] ...
230099 [kbloom@gm il] My solution borrows heavily from Darren's, but I don't like the idea of

Looping: break every x times
230025 [sshikari@gm ] I have a bunch of pictures to display on a page and I want to do 4 per
+ 230029 [danfinnie@op] <% @photos.each_with_index do |photo, i| %>
| + 230037 [sshikari@gm ] Thanks Daniel, that's what I was looking for.
| + 230070 [daniel.schie] You don't need to require enumerator to get #each_with_index, at least
+ 230054 [banshee@ba s] - James Moore

require, load and include --- what's the difference?
230032 [matt@ke tl w] I'm browsing through some code, trying to familiarize myself with the
+ 230036 [pergesu@gm i] Right
+ 230039 [nicolas.desp] Seems fine to me with the difference that #include is evaluated at
+ 230040 [danfinnie@op] I think you've got it right.
+ 230044 [johnwilger@g] Basically correct on these two.
+ 230045 [vincent.four] You got the point. There's a difference however, as you're including

Re: Chess960 (#106)
230034 [w_a_x_man@ya] which = ( ARGV.first || rand(960) + 1 ).to_i
+ 230126 [rubytraining] Here's my solution.  I hadn't realized that there was an official
| 230133 [pfortuny@gm ] ...
+ 230145 [w_a_x_man@ya] # Using  Scharnagl's numbering.
  230200 [rubytraining] I decided to make a second submission that uses the official board

230055 [hollandlucas] I've just checked out this: http://ruby.cenophobie.com/RubyCheat.pdf
+ 230056 [peter@ru yr ] require °∆date°«
| 230058 [hollandlucas] Thanks a lot, Peter. It works fine now.
+ 230087 [matz@ru y- a] Put
+ 230119 [ayaz@de .s a] There is also "Time.now" which, as I see it, does not require any
  230221 [rsanheim@gm ] - rob
  230273 [ayaz@de .s a] An insightful explanation. Thanks, Rob.

with and without initialize method
230060 [chen_li3@ya ] I define two classes, one with and the other without initialize method.
230063 [dblack@wo bl] X.new
230066 [chen_li3@ya ] Thanks David. Now I get the point.

rename thread.rb
230067 [martindemell] I think thread.rb should be renamed 'threadutils.rb', with a period
+ 230075 [chneukirchen] What about time.rb?
+ 230078 [david@va ln ] This has been discussed before. I think generally the conclusion was
  230080 [shortcutter@] I second that.  It's not worth the effort.  The name is well established

[ANN] FXIrb 0.3.0 - the "it lives!" release
230084 [martindemell] Thanks to Markus Prinz for filing a bug report and getting me to take
+ 230085 [martindemell] Doh - http://rubyforge.org/projects/fxirb/
+ 230111 [vjoel@pa h. ] how about this?
| 230176 [martindemell] With another fallback for fox12 too, I suppose. Yes, that should work
+ 230174 [guslist@fr e] Can it use fri (fastri[1])? That would be great.
| 230183 [markus.prinz] Hm, that would probably more fitting for fxri[0] than fxirb. I'll take a
| 230198 [guslist@fr e] Ah! Yes. I got confused. But that would be great anyway :)
+ 230180 [markus.prinz] Do you think you could also publish it as a gem? It would make it easier
  230203 [martindemell] Good point. Will look into doing this within the next few days.

Question regarding threads and I/O
230089 [_mwryder@wo ] I am a veteran programmer but still am trying to learn Ruby.  In the
+ 230094 [logancapaldo] Check out Timeout in the standard lib.
| 230101 [_mwryder@wo ] Maybe I am missing something here but it doesn't seem to work for me.  I
| + 230103 [vjoel@pa h. ] That's a problem with the combination of the msvc-based ruby on windows
| | 230109 [_mwryder@wo ] I read that thread which was why I was wondering if one could use two
| + 230104 [logancapaldo] It works for me (well actually timeout throws an exception when the time
|   230107 [_mwryder@wo ] Windows XP Pro, which I guess is part of the problem.  The problem I
|   + 230112 [logancapaldo] I believe the other thread established that this kind of code works in
|   + 230508 [shortcutter@] You can use cygwin's Ruby - this works as expected for me on a Win XP
|     230646 [_mwryder@wo ] I just tried this on Cygwin using Ruby 1.8.4 and still have the same
|     + 230710 [ara.t.howard] gem install linux ?
|     | 230739 [_mwryder@wo ] Are you saying that I need to run this test under Linux?  I thought the
|     + 230742 [_mwryder@wo ] I found out that Cygwin for some reason had not installed Ruby and was
+ 230098 [eegreg@gm il] also, try the highline gem for help in dealing with input in general

Finding an object in a collection
230105 [tybriel@gm i] I have a collection called roles. I have a Role object with the name
+ 230106 [has.sox@gm i] ...
| 230113 [tybriel@gm i] This worked great, thanks!
+ 230108 [TimHunter@nc] ri Enumerable.find
  230110 [has.sox@gm i] ...

load/require into module/class, revisted
230125 [transfire@gm] revisting a topic brought up a few times before. a good reference

pthread_mutex_lock is causing Kernel#at_exit
230134 [ snk@gn .o g] I have a C program which embeds Ruby inside a pthread. The C program and

Ruby Cookbook, opinions?
230139 [richard.conr] Taking a break from Holiday shopping I found that my local bookstore
+ 230141 [peter@ru yr ] Heh, I am just writing a blog entry with the review (I am about 75%
+ 230148 [gaugaz@l3 .d] I just finished a first reading of The Ruby Way (2nd Ed). I really liked
+ 230154 [work@as le m] I've lost count of the times I've googled for ages for some ruby
| + 230168 [chris.lowis@] I like it a lot. I'm quite new to object-orientated programming, and
| + 230193 [richard.conr] Ashley,
+ 230210 [louis.j.scor] I purchased both the Ruby Cookbook as well as The Ruby Way (2nd Ed).
  230218 [TimHunter@nc] I agree heartily. I have both TRW and the Cookbook. Either would be a

Problem installing Ruby/Tk
230147 [christopherl] Installed Linux
+ 230159 [umageller@gm] Yes that's the _source_ for the tk extensions
| 230171 [christopherl] How can I determine if I have Tk installed?
| 230179 [umageller@gm] That's actually not Tk, but Ruby's Tk binding for Tk, which needs the
| 230186 [christopherl] I've installed ActiveTcl8.4, in /usr/local/ActiveTcl-8.4.
| + 230197 [david@va ln ] Does ActiveTcl come with development headers and files? Did you install
| | 230201 [christopherl] I've installed ActiveTcl after Ruby.
| | 230204 [nospam@no it] / ...
| + 230211 [umageller@gm] no, when you require "tk", what you're doing is to load the **ruby
|   230325 [christopherl] /usr/local/ActiveTcl-8.4/include
|   230402 [nospam@no it] If "suddenly the script is gone", without any further information about what
+ 230248 [nagai@ai ky ] If you fail "require 'tcltklib'",
  231053 [christopherl] I ran these configure codes, but what you mean by recompile and
  231054 [vincent.four] make; make install

Re: [QUIZ] Chess960 (#106) [SOLUTION]
230149 [m_goldberg@a] Here is my solution. Run with no argument, it generates a random
+ 230151 [Rob@Ag le on] I found the Wikipedia article that described the
+ 230616 [james@gr yp ] But isn't the standard position 518?
+ 230622 [james@gr yp ] I'm not sure why you subtract one here, but removing that seems to
  230718 [m_goldberg@a] The answer to both questions is: I'm just being perverse. I decided
  230722 [james@gr yp ] Just FYI, a one-base numbering scheme is described on Wikipedia, but

230152 [Bil.Kleb@NA ] Regards,
+ 230153 [umageller@gm] ...
+ 230155 [charles.nutt] Yeah, cool stuff. I've been following the JRake development the past
  230157 [umageller@gm] ...
  + 230708 [charles.nutt] It's hard to say, but if there's a straightfoward translation for tasks,
  + 244144 [caleb.powell] I know I'm posting to this forum a little late but....

item order in Object#methods
230162 [andrea.fazzi] please consider two files: init.rb and init_2.rb. In init.rb put this
230165 [Rob@Ag le on] self.methods.sort.collect { ... }
230169 [andrea.fazzi] Because I'm interested to the methods' definition order inside the class
230173 [Rob@Ag le on] I'd not be surprised to hear (from someone who actually knows rather
230185 [gavin.kistne] I'm moderately sure that Ruby doesn't internally keep track of the order
230194 [andrea.fazzi] Thank you Gavin, your implementation solved my problem!

[ANN] Rails Book 2nd Edition now shipping
230164 [andy@pr gm t] It's been a long time coming, but we're very pleased to announced
+ 230167 [pergesu@gm i] Cool.  Congrats guys.  And thanks.
+ 231478 [pergesu@gm i] Got mine in the mail today, looks good :)

230166 [chen_li3@ya ] I can use parseexcel to open excel file and process the data within
230192 [hannes.wyss@] ParseExcel does not write Excel files. For that you will have to use
230212 [chen_li3@ya ] Thanks. I'll give them a try tonight to see if they work.
230249 [chen_li3@ya ] Do you know what the advantages of using parseexcel are , compared to
230294 [hannes.wyss@] Li
248102 [abhishek@cr ] Can anyone Help me, how do I use excel file for data driven

What kind of scoping does Ruby use?Static or Dynamic
230172 [anoyan@ho ma] What kind of scoping ruby use, even if it has lots of scoping rules
+ 230184 [shortcutter@] Static.
+ 230190 [kbloom@gm il] Ruby uses static scoping in the basic syntax, however the use of eval with

sorting an array  w multiple values
230177 [josselin@wa ] I understand how to sort an array with a single value but how can I
+ 230181 [dblack@wo bl] ...
| 230230 [josselin@wa ] thanks a lot , got it...  written in my secret notebook.... ;-)))
+ 230182 [umageller@gm] would this help ?
  + 230188 [gavin.kistne] sorted_array = an_array.sort_by{ |e| [ e[1], e[0] ] }
  | 230234 [josselin@wa ] thanks got it too...  I think I am strating to understand the logic
  + 230233 [josselin@wa ] thanks ..  got it ..  so many things to think..