293110-411634 subjects 293522-305336

Class and inheritance
293312 [august0866@h] I am not a programmer, yet.  I am trying ruby on for size, most things
293372 [duvandekoker] ...

Looking for UK based Ruby On Rails developers
293314 [danny.heathc] My name is Dan Heathcote, I am working for a UK based Recruitment
293336 [pietia.moo@g] there is many ruby/rails developers, but there is also

merb and rmagick thumbnails
293317 [flo.schaf@gm] I'm playing around with a merb app to upload images. The upload works

Ruby 1.8.6-p114 / 1.8.5-p115 released (Security Fix)
293323 [shyouhei@ru ] Vulnerabilities were found on a subsystem of WEBrick which enable
293329 [shyouhei@ru ] ...

Class and inheritance
293327 [august0866@h] I am not a programmer, yet.  I am trying ruby on for size, most things
+ 293331 [fred@la av .] The constructor in ruby is named initialize, not the name of the class
| 293349 [august0866@h] ok, new attempt
| 293352 [august0866@h] My intent is when i call class Npc(str) i want to get back
| 293366 [fred@la av .] Ok.  Here's an adapted version of your code.
| + 293383 [august0866@h] Thank you for taking time i appreciate the help,
| | 293397 [fred@la av .] First and before all, indentation.  Try to indent your statements by two
| + 293462 [celtic@sa ry] ...
|   293494 [fred@la av .] Indeed.  I wanted to make that modification, but it seems I forgot it...
|   293499 [august0866@h] OK, 2 dumb questions What is the difference between a class and a
|   + 293520 [gwtmp01@ma .] A module is a container for methods and a namespace
|   + 293527 [caduceass@gm] Not sure, but I think the logic.  (@smarts.to_f < 14 or @speed.to_f <
|     + 293529 [august0866@h] Ok, i'm looking for a true false answer to choose a job.  For example
|     + 293533 [caduceass@gm] One other thing, though.  Maybe you want your code to cascade the
|       293553 [august0866@h] Thanks Todd,
|       293587 [caduceass@gm] I'll make a couple assumptions here.  I think you want to have minimum
|       293594 [caduceass@gm] I should point out, too, that my use of #min only works if you want to
|       293778 [august0866@h] Wow Crunchy code.  it will take ma awhile to decipher all the things
|       293839 [caduceass@gm] With comments...
|       293934 [shevegen@li ] I recommend using
+ 293343 [stefano.croc] ...

scaffold upper case table and underscores
293339 [jcharth@gm i] model and controller for lower case tables just doing
293403 [avdi@av i. r] You should look into the set_table_name[1] command if you have to deal

Need some explnation to_proc
293342 [vishalsodani] I am looking for some explanation for this ruby snippet.
293347 [sepp2k@go gl] yield "Jane"

net-ldap and OpenSSL
293350 [damnbigman@g] ...
+ 293358 [vk@ds .p pe ] @con = Net::LDAP.new(:host => ldap_server,
| 293362 [damnbigman@g] ...
+ 293359 [damnbigman@g] ...
  293488 [vk@ds .p pe ] Wild guess, it is possible that it is trying (and failing) to validate
  293491 [damnbigman@g] ...

Watir too slow
293353 [mirthcyy@gm ] I'm using watir to get the result from a html table into an array like
293427 [pmr16366@gm ] you could try hpricot - either by using net/http or by dumping the hml

Loading a file in a buffer...
293357 [z4n9ief@gm i] I would like to load the exact content of a file in a buffer (with the
+ 293361 [stefano.croc] To get the contents of a file, opening it is not enough. You need to
+ 293363 [mikeisgreat@] File.open("/home/my_file", "r") do |infile|
+ 293364 [m_goldberg@a] Try
  293365 [z4n9ief@gm i] Thanks! 'read' method works very well :)

[ANN] CalTerm: ncurses calendaring
293367 [ruby@an hr p] It's no iCal-killer, but I needed something to let me at least view my ical

overwriting (for real) a class
293375 [cjbottaro@gm] How can completely overwrite a class (not extend it)?  For example.
+ 293380 [sepp2k@go gl] MyClass = nil
+ 293382 [micathom@gm ] You can remove methods (there is a private method Class#remove_method)
  293386 [why@ru y- an] For security on Try Ruby, I remove any IO classes and methods.  Some

Bug in regex engine ?? Must be...
293376 [david.krmpot] I'm using Ruby 1.8.6, and I just discovered something rather
+ 293418 [Rob@Ag le on] $KCODE = 'UTF8'
| 293849 [david.krmpot] Great info.. completely forgot that this is available...
+ 293857 [perfectly.no] MjAwOC8zLzMsIEQuIEtybXBvdGljIDxkYXZpZC5rcm1wb3RpY0BnbWFpbC5jb20+Ogo+IEhpLAo+

Re: maximum size of hash key?
293378 [shortcutter@] There is no such limit.  There are just the published requirements for

Why is this not implemented in Ruby
293399 [d_rems@ya oo] It is probably a good reason but why is this not implemented in ruby.
+ 293400 [jameskilton@] Show me a language that does allow you to do this, I've never seen it.
| + 293402 [monojohnny@g] As an aside: I think it was VB that used to let you do that missing
| | 293413 [fred@la av .] Yes, definitely VB6.
| | 293441 [wieczo.yo@go] VB.Net still supports it in Late Binding, not sure about Early
| + 293411 [sepp2k@go gl] I don't see how this relates to the OP's post at all.
| + 293412 [d_rems@ya oo] Clipper,Alaska xBase++. Omitted parameter is treated as nil. They can be
| | 293419 [avdi@av i. r] Why not write a little wrapper method that only has the parameters you
| + 293437 [w_a_x_man@ya] sub foo( a as integer, b as integer = 0, c as integer)
| | 293452 [fedzor@gm il] People typically use hashes to get around this.
| + 293442 [wieczo.yo@go] ...
+ 293401 [avdi@av i. r] Either rearrange your parameters to put the most likely to be omitted
+ 293444 [nobu@ru y- a] Because it is ugly, I guess.
| 293455 [wycats@gm il] This coming from the language with {|x,| } as acceptable syntax :P
| 293457 [shevegen@li ] I think this is not intuitive. In this case you'd also have to know the
+ 293464 [micathom@gm ] def aProc(a=5,b=nil,c=nil)

Getting a field value in a form with ruby
293404 [pimea.mark@g] The model contains a datetime field called ends_at which is when the
+ 293405 [avdi@av i. r] Language ML.
+ 293409 [cdemyanovich] ...
  293416 [pimea.mark@g] Ok I'll try that google group then. The fields are the same name because
  293420 [avdi@av i. r] I suggest you dig into the documentation for the composed_of flag to

"Security Managers" in Ruby?
293406 [monojohnny@g] I'm a newbie: I'm inevitably comparing Ruby with Java (whether this is
293408 [avdi@av i. r] It's the $SAFE variable.

Question on the Ruby Programming Language Book
293407 [bruparel@me ] I have been reading The Ruby Programming Language book by David Flanagan
+ 293410 [billk@ct .c ] spring = Season::Spring
| 293417 [bruparel@me ] Thanks for your quick response.  You gave me the following example.
| + 293423 [avdi@av i. r] In general, Ruby programmers don't create enumerated objects.  There's
| | 293431 [bruparel@me ] Thank you.  On one hand, I have a high regard for David Flanagan and
| + 293432 [james.britt@] def next
|   + 293435 [bruparel@me ] Thanks Jim.  That is cool!  No, way cool!!
|   | 293458 [james.britt@] Thanks.
|   + 293450 [cmdicely@gm ] class Season
|     293451 [cmdicely@gm ] NAMES.each {|name| yield const_get(name.to_s)}
+ 293425 [bbxx789_05ss] I looked at the book in the bookstore.  I was very disappointed.  I read

String to Object name?
293424 [lessthaneloq] I'd like to change a string, for example, "something" and turn it into
+ 293429 [gdonald@gm i] c = "foo".singularize.camelize.constantize
+ 293439 [jballanc@gm ] Meta-programming to the rescue!
| 293466 [lessthaneloq] an "undefined local variable" error through Ruby on Rails. Any idea how
| 293471 [celtic@sa ry] ...
+ 293440 [christopher.] If I understand you properly, you have the name of a variable in a

Re: nobody knows shoes, in pdf and html
293433 [s.korteling@] I just read it and it promises to be great fun. And very goodlooking.

Better performance than native unix commands?
293445 [ntwrkd@gm il] I have an issue with nfs and listing a large amount of files that I am
+ 293456 [marike1@op o] The only way to know for sure would be make some simple tests.  I just
| 293638 [devi.webmast] I must beg to differ. Ruby doesn't stand a chance of being as fast as
| 293639 [rodrigo.berm] If you just need to list the name of the files, du is faster than ls
| 293642 [devi.webmast] First of all, that's using the wrong tool for the job. The job of ls
| + 293643 [kyleaschmitt] Your reverse DNS isn't setup properly.
| + 293648 [rodrigo.berm] Sorry I did not see all your files were on the same directory. . I
+ 293460 [celtic@sa ry] ...
+ 293461 [dan@ep rk ab] What OS are you running? Something seems like it's not working. I run
+ 293477 [lionel-subsc] Do you use any external name service (LDAP/NIS/...)? If so your problem
+ 293483 [bbxx789_05ss] lol.
| 293675 [ntwrkd@gm il] hey 7stud. i don't know what you are laughing at. depending on the logic
+ 293526 [shortcutter@] Did you try it out?  What happened?  My guess is that it's as slow
+ 293698 [pbrannan@at ] We've found on our linux-based nfs server that increasing the number of
+ 293721 [vidar.hoksta] Have you tried doing the same ls locally on the server? How many files
  293732 [lionel-subsc] man tune2fs, see "-O" and "dir_index"

Re: Hello, world? (#158)
293448 [mtko_000@ho ] Sorry that this reply seems simple, but ruby is the first programming

YAML no reorder data at loading
293459 [ranieri.tx@g] ...
293465 [stefano.croc] As far as I can tell, you can't. This is because the notation

Help: could not do gems installation
293463 [ragunathan.p] I am on windows xp. I also have netbeans installed which has ruby

!!! Path to docroot not valid: public
293467 [mhaseebkhan@] ...

and statement
293468 [loveajax@gm ] I found the following statement in routing.rb of rails framework. I
+ 293469 [shortcutter@] If /result/ is not /nil/ and not /false/ it will be returned here.
+ 293470 [bbxx789_05ss] result = true and true
  293474 [subramani.at] Thank you so much. I looked up 'and' && operands in the PickAxe book
  293485 [bbxx789_05ss] result = (x=20)
  293492 [lionel-subsc] Precedence...
  + 293505 [bbxx789_05ss] Ah.  Thanks.
  + 293543 [yermej@gm il] On Mar 4, 8:23 am, Lionel Bouton <lionel-subscript...@bouton.name>
    294050 [subramani.at] Does that mean = has higher precedence than 'and'?
    294088 [justincollin] Yes.
    294115 [subramani.at] Great. Thanks.

Why not "truncation towards zero"?
293473 [artem.vorozt] Is it intentional that  (-1/2)  gives -1 ?
293476 [michael.ulm@] I say not only is it intentional, but in this case Ruby gets it Right(TM).

problems closing a CD
293475 [tomcloyd@co ] I'm utterly baffled by this simple problem in a ruby program I've run a
293478 [jan.svitok@g] I guess this has something to do with mounting/umounting, though I
293479 [tomcloyd@co ] The problem is that I need an unmount WHILE the program is running, and
293482 [jan.svitok@g] 1. lsof will show you your process' open files.
293791 [tomcloyd@co ] Jano,

Garage Shoes?
293480 [cuttingedgep] Summer Sandals, Canvas Shoes, Canvas Boots & Trainers.GarageShoes is
293489 [kyleaschmitt] Wow.  Why must have been really busy to come out with all those shoes
293490 [biot023@gm i] He's definitely a productive chap, although I think the quality suffers
293583 [martindemell] Probably a problem with the underlying canvas lib

Ruby Gems System Update Error
293481 [seo@mk yn mi] I've got an old version of rubygems on my server and so I went to update
293515 [perfectly.no] 1. Maybe a permissions problem. Did you run it as root?

jruby vs mri memory management
293484 [hramrach@ce ] I have tried to run my string munching application in JRuby, and I am
293496 [lionel-subsc] I've briefly tried Jruby 1.0 and 1.1RC2 with the latest Sun 1.6 JVM on
+ 293504 [charles.nutt] There have been more perf improvements since RC2, but we should be more
+ 293507 [charles.nutt] I did not get any NPE on JRuby trunk. It's possible something was fixed
+ 293510 [charles.nutt] I did some investigation on the benchmarks.
| + 293513 [wieczo.yo@go] Great to hear that you keep your ears and eyes on the community :)
| + 293518 [lionel-subsc] If you happen to get a similar problem, for the reference DOUG makes
| | 293521 [charles.nutt] I'll give it a try, thanks for the tip.
| | 293523 [charles.nutt] Confirmed and fixed already. It was a bit of code allowing Java nulls to
| + 293519 [charles.nutt] I haven't completely cleaned it up, but I removed a lot of unnecessary
+ 293541 [hramrach@ce ] Technically Java can do that for ages already. It has a proper VM that
  293552 [lionel-subsc] For example I use a ruby script as an output filter for incoming mails

Does this URI.parse http:/ bug has been fixed in Ruby 1.9?
293487 [weppos@gm il] I'm looking for someone with a Ruby 1.9 installation for a quick test.
+ 293495 [decoux@mo lo] vgs% ./ruby -ruri -ve 'p URI.parse("http:/foo.bar.com")'
+ 293557 [nobu@ru y- a] It's not a bug.

Re: The Ruby Programming Language - what are your thoughts?
293493 [coignerATgma] The new one by Flanagan and Matsumoto? I have it. Along with a few others
+ 293887 [coignerATgma] While your mileage may vary (of course), it's definitely become my main
+ 293944 [no@sp m. le ] I haven't finished reading it yet, but it's every bit the book
  293955 [dave@pr gp o] I think it's great that we now have books that suit different people.
  + 293969 [caduceass@gm] I definitely like both books, but being the stubborn person that I am,
  + 293982 [no@sp m. le ] I was more forceful than I needed to be. The problem I have with the
    + 293984 [avdi@av i. r] Back when it first came out, there was only the one book, and not
    + 293994 [james@gr yp ] This request confuses me.  The Net::* libraries are part of the
    | 294003 [no@sp m. le ] I don't think that folk wanting a reference care whether something's
    | 294125 [tomcloyd@co ] This is absolutely true, for me - an amateur trying to learn ruby in
    | 294148 [james@gr yp ] If it doesn't need a require, it's core.  If it does need a require
    | + 294225 [no@sp m. le ] It isn't the point.
    | | 294254 [andrei@an re] What standard libraries did you find at ruby-doc.org/core? From what
    | | 294266 [no@sp m. le ] CSV CGI DOT DRb Generator GetoptLong IRB IXMLDOM* Logger Net OpenURI
    | | 294372 [cmdicely@gm ] The 2nd and 3rd editions of Programming Ruby do have those.
    | | + 294386 [james.britt@] If someone wants to assemble these for 1.8  and 1.9 I will gladly put
    | | + 294476 [dave@pr gp o] But I did contribute all the descriptions of the built-in methods and
    | + 294264 [tomcloyd@co ] Oh, now that's helpful. Also explains why sometime require is needed,
    + 294152 [alexey.verkh] Anyone still struggling with RDoc or perusing dead trees for API
      294262 [tomcloyd@co ] Very nice resource - thank you!

Cloning a module and isolating it from the clone
293497 [eclubb@va co] I'm trying to find a way to create a copy of a module and then sever all
+ 293511 [bbxx789_05ss] module A
+ 293514 [bbxx789_05ss] Whoops.   I see what you mean.
| 293700 [bbxx789_05ss] Did you find a solution?
+ 293703 [dan@fl en ra] CommonDef = %q{
  293706 [bbxx789_05ss] module A
  + 293711 [eclubb@va co] I'm trying a different approach than I was initially, but I get the same
  + 293714 [bbxx789_05ss] I see now why that doesn't work.  Even though the code changes the class
  | 293716 [bbxx789_05ss] Or, maybe what is really happening is that module B has references to
  | 293799 [decoux@mo lo] 7> Or, maybe what is really happening is that module B has references to
  + 293733 [dan@fl en ra] Identical methods in fact. Earle said that he wanted identical

extract information from a large text
293501 [zht.phoenix@] I 'm new to ruby.I want to extract some useful information from a web
+ 293512 [elof@el f. k] I recommend that you use the hpricot gem with lets you use xpath
+ 293525 [shortcutter@] String#scan.

Zed Shaw on Ruby Pros/Cons: You Used Ruby to Write WHAT?
293506 [esther@bi ra] You Used Ruby to Write WHAT?!
+ 293530 [cmdicely@gm ] I'll use language a little less colorful than Zed himself might use in talking
| 293535 [vjoel@pa h. ] I'm a bit surprised he didn't take the easy shots at ruby: not suitable
| 293538 [caduceass@gm] I agree he skipped over some things (both bad and good), but I think
+ 293540 [mrt@th ma zo] I was surprised to see his claim that Rails isn't any good for writing
  + 293542 [gdonald@gm i] Same here, multiple CMS's under my belt using Rails, no major problems.
  + 293550 [khaines@en g] "The caveat on Ruby for Web programming is that Rails is better suited for

[ANN] Samizdat 0.6.1: Security, MVC, RSS import
293509 [angdraug@gm ] What is Samizdat?
293548 [avdi@av i. r] Are there any plans for factoring out some of these modules into
293581 [angdraug@gm ] Maybe, but I don't see it as a priority: nothing stops you from