312835-325443 subjects 313254-314071

Writing a method to handle a code block?
313027 [p.brian.ross] ...
+ 313036 [adam.shelly@] Yes the & is necessary, otherwise when you try to call this method
| 313058 [p.brian.ross] ...
| + 313104 [p.brian.ross] ...
| + 313126 [adam.shelly@] I'm probably not the best explainer... but you are on the right track.
+ 313037 [uzimonkey@gm] Code (in the form of Proc objects and similar) can be stored in a variable.
+ 313161 [ninja@sl ph ] def each_vowel
  313293 [p.brian.ross] ...
  313294 [buddhamagnet] ...

A general doubt
313031 [karoljouis@g] If I am developing a Windows application in Ruby using FxRuby or WxRuby,
+ 313038 [uzimonkey@gm] It's not silly, it's a genuine concern.  Having users install Ruby and a
| 313041 [adam.shelly@] I have used rubyscript2exe with FxRuby, and it works fine.  (Startup
| 313042 [etaern@ya oo] but,what if I don't want the end-user to be able to see the source code
| + 313046 [wieczo.yo@go] You might try to obscure the code, but it will be still available in
| | 313090 [james.britt@] I've a fork of rawr while I work on adding .rb-to-.class -> jar behavior
| + 313047 [karoljouis@g] Ya. I too have doubt in the expose of .rb files to the end user.
| | 313050 [alex@de et m] Weft QDA's an open-source product aimed at end-users so the fact that
| + 313048 [alex@de et m] Rubyscript2exe is an easy and pretty effective solution for both wxRuby
| + 313051 [uzimonkey@gm] You can't really do that, the best you can do is obfuscation.  Even
|   313052 [karoljouis@g] Thank you. But when a hacker who knows the internals of the software
|   + 313193 [uzimonkey@gm] If a "hacker" has write access to your end user's files (including the
|   | 313222 [rhkramer@gm ] Another approach to the problem is to strictly separate code from data (and
|   | 313230 [uzimonkey@gm] Even that's not effective.  ROM dumps are not difficult to obtain, ROM
|   | 313244 [rhkramer@gm ] (and
|   | 313260 [rhkramer@gm ] right---------------^
|   + 313198 [joost@ze ka ] Are you seriously suggesting that generic application software should
|     313206 [karoljouis@g] Thank you for your reply. What i am telling is if if a hacker accesses
|     313212 [joost@ze ka ] You're not wrong. You're just approaching the problem the wrong
|     313232 [gregory.t.br] Can we stop using Hacker to describe computer criminals?  The two
|     + 313236 [uzimonkey@gm] Like it or not, that's what it means now.  In fact, using its true
|     | 313240 [gregory.t.br] Sure, if you're going on the daily news.  I'm suggesting you do
|     + 313243 [dblack@ru yp] It really sucks that the word got hijacked, and I never use it that
+ 313123 [joost@ze ka ] [ some question regarding ruby ]
+ 313211 [davebass@mu ] If you don't want people to see your source code, and you want your app
  313215 [karoljouis@g] 100% I agree with you. It is true. But my points are
  313220 [joost@ze ka ] It's a nonsensical scenario. WHY would some intruder do this, when he
  313231 [uzimonkey@gm] Even if the Ruby program could be encrypted or obfuscated, they could

[SUMMARY] Uptime Since... (#174)
313039 [matthew.moss] First thing: the quiz name is off. Really, it should properly have

[ANN] JRuby 1.1.4 Released
313054 [Thomas.Enebo] The JRuby community is pleased to announce the release of JRuby 1.1.4!
313067 [james.britt@] Thanks for continued kick-ass work!
313079 [bill.walton@] +1.  The work you guys are doing is, IMHO, the real key to Ruby's acceptance

Subtle bug with catch/throw. Am I missing something?
313061 [patrickli_20] I'm having trouble locating this bug that I'm having. I think it's
+ 313063 [tpreal@gm il] What does this @enterEvent.listen do? If it saves the block passed to it
| 313066 [patrickli_20] Ah I see.
| 313069 [tpreal@gm il] It's a design issue, if it is the case, because at the time the :exit is
| 313085 [patrickli_20] Thanks for your responses.
| 313097 [monojohnny@g] Patrick,
| + 313101 [vjoel@pa h. ] Symbols are literal values, so they are not affected by scope.
| + 313102 [patrickli_20] I agree, it's a very ... interesting problem. (Frustrating at first, but
+ 313064 [vjoel@pa h. ] I'm guessing that the problem is that the listen block has been saved
+ 313068 [monojohnny@g] Patrick,

Webrick Servlet: 'chomping' ? Is this slowing it down?
313062 [monojohnny@g] I'm not using Rails: just a standalone 'Webrick' Server. I have a very

Switching from Webrick->Mongrel (not rails)
313065 [monojohnny@g] For performance reason, I'm thinking of migrating my webapp (not rails)
313171 [rogerpack200] Check out the mongrel docs and example files--I think there's one in

Use a string as a method call
313070 [christopher.] I'm trying to come up with an efficient way of using user input as a
+ 313072 [damnbigman@g] ...
+ 313073 [tpreal@gm il] ALLOWED=[:foo,:bar]
| + 313074 [tpreal@gm il] Sorry, more like send(:"do_#{input}") in your example.
| + 313162 [ninja@sl ph ] Subtle memory leak here: A symbol, once defined, is never collected. (Unless
+ 313076 [gregory.t.br] ACTIONS = %w[foo bar]
+ 313078 [monojohnny@g] class MyClass
| 313081 [sepp2k@go gl] Actually you don't need to do that. send takes strings too.
| 313084 [monojohnny@g] Even better! You gotta love Ruby _even_ more for that :) (Thanks !)
| 313094 [christopher.] Thank you everyone for the quick and helpful replies! I toyed around
| 313095 [tpreal@gm il] The variable names don't agree but I suppose it's a typo in the post?
| 313096 [christopher.] Arg! The variable mismatch was a typo, and the error is because I was
+ 313080 [stefano.croc] method_name = gets.downcase.chomp
| 313083 [stefano.croc] Of course, with this approach, you'll need to change the names of your methods
+ 364903 [grep.the.pla] First time poster, and I was so surprised I was able to find this
  364904 [grep.the.pla] Hah, I figured it out. This always happens - I have to formally type out

Dertemining what is sending ABRT signal
313075 [cashew250@gm] Some of my ruby processes quit saying they were aborted. I just put in

Blacklisted search terms
313089 [bjohnson@co ] I'm building somewhat of a search engine and have been trying to find a
+ 313091 [monojohnny@g] Try : http://en.wikipedia.org/wiki/Stop_words - there's a link at the
+ 313092 [emmanuel.sur] ...
  313093 [bjohnson@co ] Awesome, thanks for your help

Please don't flame me...why is there no "++" in Ruby again ?
313098 [monojohnny@g] There's must be very good simple reason why there is no 'x++' method
+ 313100 [vjoel@pa h. ] In ruby, operators are methods and they operate on objects, not on
| + 313105 [robert.dober] ... and as Integers are immutable ++ cannot change the underlying object.
| | + 313107 [martindemell] Also note that this will not do what you expect from other languages
| | | 313108 [mark@co te -] Yes, that really freaked me out the first time it happened to me...
| | + 313180 [larsch@be un] I think the OP deserves the fuller explanation; Why are integers
| |   313238 [robert.dober] You are right, but I did after realising my error ;).
| + 313164 [ninja@sl ph ] That's not really a valid reason, and not entirely true -- there is no +=
|   + 313169 [rogerpack200] I wish we had it.  But that's just me.
|   | 313235 [phlip2005@gm] Ruby doesn't use ++ because that would .succ!
|   | 313241 [robert.dober] No it would not, and if you have good memories you know who was the
|   + 313174 [robert.dober] You are right of course, the original question was, why is there no
|   | + 313178 [cmdicely@gm ] Because Ruby is hard enough to parse as it is. After all, ++x is
|   | + 313186 [dblack@ru yp] Matz has always said that the reason is that he doesn't like the idea
|   | + 313190 [frederick.ch] Although it usually isn't quite the same as just x = x + 1 (that's
|   + 313361 [erik@ho le s] The answer is much simpler than people are turning it into: hopefully
|     + 313363 [vjoel@pa h. ] If we're considering this as an analogy to C, it doesn't work that way.
|     + 313367 [ninja@sl ph ] Except 1++ wouldn't work, any more than 1 += 1 would work.
|       313388 [erik@ho le s] You're right, and boy is that an embarassing omission on my part. :)
+ 313210 [davebass@mu ] The problem with the ++ operator, and similar operators, is that the
+ 313325 [nobu@ru y- a] Because I'm planning to add a new comment beginning, '--', like

Japanese Heritage of Ruby: useful by-product?....
313106 [monojohnny@g] Apologies if this is in the wrong forum, I just thought it was
+ 313116 [martindemell] T24gVGh1LCBBdWcgMjgsIDIwMDggYXQgMjo0NiBQTSwgSm9obiBQcml0Y2hhcmQtd2lsbGlhbXMK
| + 313117 [martindemell] MjAwOC84LzI4IE1hcnRpbiBEZU1lbGxvIDxtYXJ0aW5kZW1lbGxvQGdtYWlsLmNvbT46Cj4gT24g
| + 313128 [gregory.t.br] MjAwOC84LzI4IE1hcnRpbiBEZU1lbGxvIDxtYXJ0aW5kZW1lbGxvQGdtYWlsLmNvbT46Cj4gT24g
+ 313172 [dido.sevilla] I think the glaring problem for Westerners would be actually learning

Re: Please don't flame me...why is there no "++" in Ruby aga
313109 [monojohnny@g] That makes sense : and I guess 'x++'=> x+1 would be just confusing..
313408 [robert.dober] Do you mean, people should not write

313110 [clintwill@co] unsubscribe
+ 313111 [clintwill@co] ...
| 313112 [clintwill@co] ...
| 313113 [clintwill@co] ...
| + 313114 [clintwill@co] ...
| + 313119 [martindemell] martin
+ 313120 [tommy.morgan] If you examine the headers for the email, you'll see that you need to
  313121 [tommy.morgan] Gah, fat-fingered before I could send.

random undefined method error
313122 [huyingtuo@gm] I have the following nested loop, it gives undefine method "radio"
313256 [monojohnny@g] Can you post the whole call stack - I don't why this would be occurring

Class ===
313131 [RubyTalk@gm ] I need help with === and Objects
+ 313135 [wpdster@gm i] and I would also like to know why
| + 313137 [dblack@ru yp] Because the instance method Array#=== is not defined as a test of
| | 313139 [wpdster@gm i] Ahhh.... that makes perfect sense!  (And I mean that in the "light
| | 313142 [dblack@ru yp] If you ever want or need to, you can google for ruby "case equality"
| + 313138 [41mortimer@g] Forgive me if I'm missing something obvious, but wouldn't it be a whole
|   + 313140 [wpdster@gm i] yup... that makes good sense too.
|   | 313144 [41mortimer@g] Even better, if its possible you'd want to use the method on a structure
|   | + 313146 [41mortimer@g] Oops, I think that might have been a bad example???I don't think Ruby's
|   | + 313216 [wpdster@gm i] except...
|   |   313221 [dblack@ru yp] "Element" doesn't have a universal meaning either, though. It might be
|   + 313265 [robert.dober] This is OT but as OP got lots of useful information already ;).
|     313273 [41mortimer@g] All true, but also consider the fact that === requires one to remember
|     + 313275 [41mortimer@g] Of course, the beauty of Ruby is that they're both available, so you can
|     + 313280 [robert.dober] I believe that because of the case statement semantics it is necessary
+ 313136 [dblack@ru yp] [I seem to have added the letter 'B' to the subject line when I
  313259 [RubyTalk@gm ] The reason is that all objects are instances of Object and its
  + 313266 [lasitha.rana] Not sure if i can explain this well but i'll take a shot at it.
  + 313271 [reitinge@in ] ri Class

Re: Class ===B
313133 [dblack@ru yp] a === b

missing header stdio.h??? (when updating hpricot gem)
313134 [41mortimer@g] I just ran 'gem update' this evening, and during the update for hpricot,
+ 313170 [rogerpack200] It's attempting to compile it.  This error means either you don't have a
| 313228 [41mortimer@g] Sounds likely.  The same update worked fine on my work machine this
| 313297 [rogerpack200] You'll want to use the same compiler that you Ruby distro was compiled
+ 313189 [frederick.ch] Do you have a working C compiler installed? Sounds like you don't
+ 313369 [AEtzold@gm .] See here: http://www.ruby-forum.com/topic/162379#new (last post).
  313372 [41mortimer@g] Thanks very much!  Doug

Immutable Ruby
313141 [transfire@gm] I was thinking about Erlang a bit today, the fact that it's objects
+ 313149 [john.carter@] The notion of a setter is probably very problematic.
| + 313155 [vjoel@pa h. ] $".freeze
| + 313160 [transfire@gm] Almost. From my understanding Immutable objects can have internal
+ 313156 [matz@ru y- a] I have once dreamed of a such language, and had a conclusion that was
  313285 [transfire@gm] Does that mean you think Immutable Ruby would be so different a
  + 313287 [dblack@ru yp] ...
  + 313290 [smparkes@sm ] Sounds similar to what Tony's thinking about with Reia.
    313299 [tony@me io .] Yep, thanks for mentioning it.

NoMethodError ?
313143 [christopher.] In the following code I am trying to print out the value of the
313152 [christopher.] Well I figured out the first half of my problem. I guess my show_map
313153 [christopher.] Ok I've gotten it all figured out and working, thank's anyhow! =)

gem command hangs with no output
313154 [moctile@gm i] Tried to run "gem outdated" on my CentOS 5 server. It just hung with no
313218 [monojohnny@g] This happens to me now and then: especially on my Ubuntu box (low-spec
313264 [moctile@gm i] Thanks for the reply. I upgraded to the latest version of gem and the
+ 313311 [drbrain@se m] Bulk updates were removed in RubyGems 1.2, which caused excessive
+ 313645 [kannan.deepa] on the rubygems FAQ page a link is there on

[ANN] mechanize 0.7.8 Released
313159 [aaron@te de ] mechanize version 0.7.8 has been released!

Re: mechanize 0.7.8 Released
313163 [etaern@ya oo] Your gem is the one I use the most. Thank you !
313375 [aaron@te de ] You're welcome.  :-)

[ANN] geoip 0.8.0 Released
313165 [no@sp m. le ] geoip version 0.8.0 has been released!

Gem command works locally, not on remote machine
313166 [moctile@gm i] I'm having some trouble with the gem command. On my local MacBook Pro
313437 [graham.ashto] There's an issue with gem on low memory machines; I believe that the

problem with video uploading
313167 [rizzwanabanu] I have to upload videos to youtube via a form in my application. I
+ 313168 [etaern@ya oo] I would suggest trying with mechanize . If that doesn't work , try with
+ 313176 [james.britt@] Have you read the Youtube API docs?

[ANN] Sequence 0.2.0
313173 [vikkous@gm i] ...

u just click, u get some dollars
313177 [npnithyapavi] ...

how can I debug treetop grammar?
313179 [etaern@ya oo] which rule the parser it's trying , what it matches , what part of the
313237 [no@sp m. le ] Each SyntaxNode has "interval", which is the range of byte-offsets matched,
313261 [etaern@ya oo] Thank you Clifford , I really appreciate you taking the time to answer
313276 [etaern@ya oo] Would you please walk me through a debugging example ? Considering this

Proc and lambda
313195 [jona.hunt777] I'm new to Ruby with PHP background.
+ 313199 [antonin.aman] Procs are very surprising when no background in languages that
+ 313201 [jgabrielygal] The easiest way for me to understand those are to think of them
+ 313202 [jcoglan@go g] ...
| 313205 [B.Candler@po] myfun = lambda { |x,y| x+y }
+ 313308 [jcmoore@pr s] This bothered me for the longest time and the clearest description I've

Computing folder size - do you have something cleaner than this ?
313196 [thibaut.barr] I'm computing an approximate folder size by summing the sizes of its
+ 313204 [antonin.aman] ruby core Find class may be more appropriate. But you may run
+ 313207 [uzimonkey@gm] Maybe use the Find module?
| + 313227 [shortcutter@] And it even "fits" nicely on one line
| | 313233 [uzimonkey@gm] Not really...  Ruby is not Perl, use your enter key.
| | 313239 [shortcutter@] Well... Smiley is not Serious, use your glasses.
| | 313248 [uzimonkey@gm] Sorry, my eyes glazed over at the first sight of the symbol soup and I
| | 313253 [shortcutter@] Granted, looking at this is hard.  But you should see my fingers after
| + 313245 [thibaut.barr] Thanks guys,
+ 313252 [ara.t.howard] here is an ancient ruby script i use for that, it also considers =20

Re: Computing folder size - do you have something cleaner th
313203 [monojohnny@g] Don't know about more readable faster, but there is a built-in 'find'

Parameter Type Checking in methods.Q?
313214 [monojohnny@g] Again...just wondering....(and you can probably tell I'm comparing Ruby
313223 [dblack@ru yp] I hate to sound curmudgeonly but please check out the probably
+ 313224 [monojohnny@g] Apologies. I did have a check on the forum beforehand but didn't find a
| 313229 [dblack@ru yp] Try googling for: "type checking" ruby (even though 99% of the time
+ 313225 [shortcutter@] Exactly. :-)
  313234 [monojohnny@g] Thanks ! (and I'll stop spamming this subject now!)

standards when using WIN32OLE
313226 [aidy.lewis@g] If I use WIN32OLE in Ruby should the method names be Ruby standard

[QUIZ] Where the Required Things Are (#175)
313242 [matthew.moss] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+ 313306 [funkaster@gm] Lots of fun with this quiz :-D
+ 313413 [jesse.d.merr] module Kernel
+ 313417 [uzimonkey@gm] require statements with circular requires.  It ends up printing a lot of
| 313420 [uzimonkey@gm] Small bug fix to account of files that aren't found.
+ 313427 [wilsonb@gm i] This is what came to mind. Interesting idea. I may just keep this around.
+ 313429 [fophillips@f] def locate(file)
+ 313431 [hramrach@ce ] ...
+ 313691 [adam.shelly@] Here's my solution.  I used the mod_req_level counter to restrict the
| 313789 [hramrach@ce ] ...
| 313842 [hramrach@ce ] ...
+ 313765 [dan.stevens.] ...