371310-372187

371101-372353 subjects 371558-373214

^ Benchmarks Project and example for `||=`
371310 [transfire gm] Has anyone ever put together a suite of benchmarks that simply measure
371315 [ammarabuali ] It would be interesting to have performance comparisons of the various
371369 [transfire gm] out
371387 [jeremy bopp.] The issue is one of relevance though.  Of course using ||= is slower
+ 371389 [rick.denatal] It struck me as odd that Trans is benchmarking two different things
+ 371390 [rick.denatal] It struck me as odd that Trans is benchmarking two different things
  371402 [transfire gm] re
  + 371404 [jeremy bopp.] Take a look at
  + 371407 [ryand-ruby z] There is a damn good reason why lazy initializing exists in the first =
    371410 [transfire gm] ce, and it invalidates your statement above.

^ "Load" Works, But "Require" Doesn't?
371317 [tom tomwardr] Can someone please explain what's going on here. No matter what I try,
371332 [ammarabuali ] What version of ruby are you using?
371345 [tom tomwardr] I'm on 1.9.2. This now raises a number of questions...
371354 [ammarabuali ] I'm not sure, but I guess (hope someone else will chime in) it is
371384 [sutniuq gmx.] In 1.9.x, there's require_relative for that purpose.
371440 [ammarabuali ] I keep forgetting about that one. Probably from avoiding it enough

^ testing if a script is run via sudo
371321 [unbewusst.se] Is tehre a way to test if a ruby script is run as a sudoer user ?
+ 371323 [sentinel1879] on my system, echo $USER gives root under sudo (mac os x).
| 371340 [unbewusst.se] I'm using too Mac OS X (zsh as default shell) i don't get samething as u
+ 371326 [b.candler po] $ sudo ruby -e "require 'etc'; puts Process.uid, Process.euid,
| 371341 [unbewusst.se] i see, nice !
+ 371327 [ammarabuali ] 2010/10/7 Une B=C3=A9vue <unbewusst.sein@fai.invalid>
  371342 [unbewusst.se] fine, thanks !

^ how do i close a file that is open in ruby
371322 [amittomer25 ] i would like to close a file that is open in particular
371325 [shortcutter ] f is a String!  You cannot close a String.
371328 [amittomer25 ] Thanks for your response robert
371336 [shortcutter ] You can easily do the same with system().
371337 [amittomer25 ] Actully my problem starts from mongrel temp file that is not closed

^ Ruby and windows GUI
371344 [spaghetticod] a friend of mine has asked me to write a quick and simple application
+ 371346 [cmdjackryan ] Pretty much. Or you can create a setup archive, including the Ruby
+ 371385 [sutniuq gmx.] No. rubyscript2exe has been abondoned by it's maintainer. Use OCRA (
| 371386 [javaalley gm] I agree with Quintus, OCRA and wxRuby are the way to go.  If you want to see
| 371392 [spaghetticod] Thanks to everyone for the bootstrap, that was exactly what I needed
+ 371771 [rogerpack200] recommend jruby + swing + rawr

^ Can anyone give a an example of this please
371353 [sbstn26 yaho] I understand how ONE parameter is passed using the 'each' method.
+ 371356 [cmdjackryan ] irb(main):001:0> [0,1,2,3].each { puts "no param" }
| 371358 [shortcutter ] There is _one_ parameter passed - you just do not pick it up in the block.
| 371361 [cmdjackryan ] Ah, then I misunderstood the question, I guess, thinking that the OP
| 371365 [shortcutter ] Actually I am not sure what the OP *really* wanted either. :-)  I just
+ 371357 [shortcutter ] called

^ how do i configure this code
371364 [amittomer25 ] This is code for mongrel http_request.rb ,here i would like

^ Maximum length of array#hash
371366 [jack.zelig g] I have a large array and want to calculate its hash-code using
371367 [jgabrielygal] Tells you the size in bytes of a Fixnum in your platform.
+ 371373 [shortcutter ] Having said that, what's the point in storing a hash code in a
| 371375 [jack.zelig g] Thanks both for the answers.
| 371379 [shortcutter ] The RDBMS way to do it would be to define a unique index (or use the
+ 371376 [jeremy bopp.] While this answers your primary question, take care with storing a hash
  371378 [jack.zelig g] Oh right, I didn't realize. I was just looking at what methods I could

^ [ANN] 2011 Fukuoka Ruby Award Competition
371371 [matz ruby-la] Fukuoka prefecture sponsors the thrid Fukuoka Ruby Award as past
371374 [shortcutter ] Are you giving any guarantees about the price of Yen at the day of payment?=
371382 [rick.denatal] t? ;-)

^ undefined method `*' for nil:NilClass
371381 [datulravi gm] Please find the .txt file attached. Am getting the following error
371398 [b.candler po] You need to give the *full* error, which includes the line at which the
371406 [datulravi gm] Thanks for your reply. Fortunately I somehow managed to debug the error.

^ Open a windows device file handle in ruby?
371388 [bangingtechn] the path '\\.\MyDevice'. In C I can then use CreateFile() to open this
372180 [cbciv yahoo.] Your assumption that you should be able to use standard Ruby IO

^ popen hangs out for user input
371393 [felix.leg vp] <CODE>
371395 [jeremy bopp.] It's probably because the write buffer for the pipe is not being
371396 [jeremy bopp.] One more thing: you may need to insert a newline at the end of the
+ 371424 [shortcutter ] Another reasonable thing to do is to close the write end of the pipe
+ 371444 [felix.leg vp] Both your answers works. THX!

^ [ANN] ruby-nis library packaged as gem 'nis' 0.1.1.1
371400 [mike.dalessi] nis 0.1.1.1 has been released!

^ urgent help required#<NoMethodError:
371405 [datulravi gm] prompts5 = ["Span type"]
+ 371412 [jgabrielygal] Without knowing what inputbox does, it seems from the error message
+ 371471 [josh.cheek g] I assume you are using Google sketchup, and you are invoking this method

^ regexp issue
371409 [shekarls gma] I have an issue in parsing regular expression and im new to
+ 371411 [stefano.croc] * $ means the end of the line
| 371416 [devguy.ca gm] if you just want to match the currency including the brackets, the
+ 371417 [gf.bozzetti ] As Stefano Crocco pointed out $,(,) must be escaped.
+ 371422 [shortcutter ] First of all, "Variable" is a constant.  You need to make the name
+ 371433 [seanh1313 tx] \$[0-9]{1,} fee
  + 371441 [b.candler po] \d+ is a more concise way to write that.
  + 371442 [shortcutter ] Instead of [0-9] you can type \d and instead of {1,} you can type + -

^ ruby 1.9.2, rubygems and gentoo linux
371414 [stefano.croc] On Gentoo linux, I have installed both ruby 1.9.2 and ruby 1.8.7, both

^ each_with_index
371419 [impulse221 y] def show_titles
+ 371420 [jgabrielygal] You don't need each_with_index for that. You have the list of articles
| 371434 [impulse221 y] Yes, but it returns me #<Article:0xb78c49a4>, not a title and a text!
| 371437 [nobuoka r-de] The Article object should have a title and a text.
| 371439 [impulse221 y] def show_titles
+ 371421 [shortcutter ] You don't.  You just use Array#[], i.e. indexed access into the Array.
  371435 [impulse221 y] Thanks

^ How to change interactive ruby background?
371425 [menasx gmail] to change interactive ruby background colour coz black colour isn't very
371426 [shortcutter ] Not sure what you mean.  There is no such thing as an IRB background.
371427 [menasx gmail] I use windows xp, when i open IRB background is black and evrything what
371428 [stefano.miol] Yes, you should do exactly what Robert told you to do.
371431 [menasx gmail] Thanks very much it helped me :)

^ how do i add  an instance variable to a class in Ruby
371432 [amittomer25 ] I have one file named class1.rb this is structure
+ 371436 [b.candler po] What do you mean by "i am not access value"? Did you try to? What code
| 371475 [amittomer25 ] i didn't get any error meassage but in class2.rb i tried to print @a
| + 371477 [gf.bozzetti ] In class1.rb and class2.rb you create templates for the classes.
| + 371480 [b.candler po] brian@zino:~$ cat class1.rb
+ 371472 [josh.cheek g] Worked for me, are you sure you required the other file?
  371548 [amittomer25 ] Thanks all for your response ,what am doing wrong is ,using
  371549 [jgabrielygal] In Ruby, instance variables are created the first time you assign them

^ Re: Chris Pine Program Challenges
371445 [sunjay.pande] Just starting myself and enjoying the book (though I'm about to pull my
371464 [josh.cheek g] If it helps, I made some videos showing what sorts "look like" (some

^ require error
371446 [prpaulroche ] arguments (2 for 1) (ArgumentError)
+ 371447 [justincollin] Require only takes a single argument. If you want to load multiple
+ 371448 [cmdjackryan ] You didn't read the error message.
+ 371449 [jeanjulien.f] The error message seems pretty clear: 'require' is waiting for only
| 371450 [prpaulroche ] Thanks all for your replies. I failed to understand the error message.
+ 371451 [Joseph.Savar] Require takes 1 param.

^ hi.....
371452 [iamforufrien] <a href=http://adultfriendfinder.com/search/g1250650-ppc?

^ HI, WE R HOT COUPLES SEARCHING HOT PARTENERS FOR GOOD FUN,,,,
371453 [iamforufrien] men, women or coples are welcome

^ HI... WE R HOT COUPLES AND SEARCHING FOR HOT MAN, WOMAN OR COUPLES FOR REAL FUN
371456 [iamforufrien] REAL FUN

^ Monitor Resque with Bluepill
371458 [di3go.bernar] Anyone have any .bill file that can monitor resque?

^ Missing rake/extensiontask
371459 [ggarra13 gma] I'm looking into compiling fxruby from its gem but it dies as it
371461 [b.candler po] Why are you starting a new thread with the same question?

^ [ANN] Money 3.1.5 released
371463 [shane.emmons] Money 3.1.5

^ Reply
371473 [alexandercru] anyone who has had success networking in a forum. Thanks

^ Getting the size of a block device
371476 [spare frigid] In Linux at least, one cannot simply get the size of a block device file
371484 [b.candler po] The ioctl is called BLKGETSIZE/BLKGETSIZE64, and a quick grep of the
371495 [joelvanderwe] Does the sys-filesystem gem have something like that?
371941 [spare frigid] I think this only tells the the block size of a mounted file-system. I

^ Re: Camping or Merb
371481 [b.candler po] I strongly recommend *not* using swiftiply. It's basically unmaintained.
371775 [paradisaeida] btw.. What was the Swiftiply bug?
371846 [b.candler po] The most severe problem I had with swiftiply was when I mounted an app

^ irb question
371485 [darren there] Iam starting to learn ruby, today is my first day actually working with
+ 371487 [sutniuq gmx.] Looks like something has set IRB to show the simple prompt instead of
| 371506 [darren there] The command irb --prompt inf-ruby worked to get it looking like the way
| 371523 [ed.howland g] Thanks for this.
+ 371499 [program.ruby] I looked into it and I can only guess since you did not state it. But >>
| + 371501 [hassan.schro] Thanks, that was good for a laugh  :-)
| | 371505 [darren there] Thanks guys for the information. I Guess its not a big deal, I was just
| + 371503 [jeremy bopp.] $ irb
+ 371500 [sutniuq gmx.] irb --prompt-mode default

^ hello
371486 [kategur74 ya] I saw your email in your profile here( www.eggheadcafe.com ) and become interested; my name is;Kate please send me your email address (kategur90@yahoo.in) to my box now so that i can send you my picture then we will know each other more;

^ Better way to remove all occurrence of matches on a String
371488 [eregontp gma] I remember many times I searched for a better way to "remove all
+ 371494 [list.push gm] If you *really* want to avoid a second parameter, you could try
| 371498 [eregontp gma] Nice one, but I guess the extra parameter is not too bad compared to this :)
+ 371508 [josh.cheek g] I think gsub with an empty string is ugly too, but I am pretty confident
| 371514 [eregontp gma] So I am not the only to think that :)
+ 371515 [shortcutter ] Don't waste too much thought on this.  After all the second parameter
  371517 [eregontp gma] akes

^ URL paramater sts - mechanize & nokogiri differences
371489 [dnorcott mts] I have written ruby code (with mechanize and nokogiri) to do the
371504 [dnorcott mts] I still have not resolved (or do not understand my problem) but the

^ Finding all cycles in a directed graph
371491 [casanejo gma] A->B->C->A
371493 [jeremy bopp.] original author (Horst DuchĂȘne) left the Ruby community and transitioned
371507 [casanejo gma] cycles()
371511 [jeremy bopp.] I see.  Do you need the minimum cycles passing through each vertex of

^ Highline
371497 [program.ruby] Was using highline for a program I am making for learning/fun. I got it
371502 [james grayso] it

^ rspec-1.3.1 and rspec-rails-1.3.3 are released!
371509 [dchelimsky g] I just released rspec-1.3.1 and rspec-rails-1.3.3.

^ Re: Automatic ClassLoader (to eliminate 'require')
371510 [axyd80 gmail] For some time I used it in my projects and yesterday release it as
371763 [jarmo.p gmai] There is also a require_all gem with similar approaches
371764 [tony.arcieri] Also MagicLoader, my almost-complete code loading counterpart to Bundler,

^ `exec': wrong number of arguments (0 for 1) (ArgumentError)
371524 [saurabhnarai] I'm new to ruby and I'm facing one issue when connecting to Oracle 11g
371544 [saurabhnarai] My bad it should have been

^ Highline and Termios issues
371525 [ed.howland g] I have question re: Highline. In this code fragment, when running on MacOS/=
371526 [james grayso] You just want to take the answer on the same line?  Add some space after =
371529 [ed.howland g] Thanks James.

^ More readable array querying
371527 [wagner.andre] All,
+ 371528 [ryand-ruby z] readable.
| 371532 [wagner.andre] Thanks for the helpful feedback.
+ 371559 [w_a_x_man ya] ing

^ RSpec-2.0.0 is released!
371531 [dchelimsky g] ## RSpec-2.0.0 has been released!

^ Why does a lot of code not include parenthesis?
371533 [ken.egervari] I just started playing around with ruby and rails, and one thing I've
+ 371534 [ken.egervari] Oh, another reason I like using . and () is because IDE support is
| + 371538 [ninja slapha] Get a better IDE, or learn to work without one. Seriously, it's pretty
| + 371610 [ara.t.howard] vim completion works with, or without, the '(' and ')'.  same with
|   + 371622 [josh.cheek g] In this case, the negative sign is also a method. Fully parenned, it looks
|   | 371631 [ryand-ruby z] looks
|   + 371688 [ninja slapha] I actually really like this about JavaScript, but as it turns out, JavaScript
|   | 371777 [echristopher] ript
|   | + 371821 [code apotheo] This is true but, to be fair, it can look an awful lot like direct access
|   | | 371875 [echristopher] Right, but I don't see what it has to do with the optionality of
|   | | 372187 [code apotheo] ss
|   | + 371889 [ninja slapha] My point was that JavaScript is like this, while Ruby is not. In JavaScript,
|   + 371780 [showell30 ya] Python is like Javascript in that regard.
+ 371536 [devguy.ca gm] its a personal style, for most simple calls parenthesis are left out. i
+ 371539 [ninja slapha] Right.
| 371542 [ken.egervari] In the case of the sqrt line, those parenthesis are not required, and
| + 371545 [cwdinfo gmai] Is it really productive to compare the use of punctuators in Ruby with =
| + 371546 [cmdjackryan ] And the Ruby parser should actually warn you about the ambiguity. The
| | + 371550 [ken.egervari] On Oct 11, 2:21=A0am, Phillip Gawlowski <cmdjackr...@googlemail.com>
| | | + 371564 [cmdjackryan ] [snip Scala stuff]
| | | + 371607 [ninja slapha] For what it's worth, this is also the case for most operators in Ruby, it's
| | + 371612 [cbciv yahoo.] Not entirely.  There's a difference in precedence that might be
| | + 371826 [code apotheo] Only well-written, readable Perl is particularly readable, even to a
| |   371830 [cmdjackryan ] In my opinion, parentheses should be used the way they are used in
| + 371547 [josh.cheek g] Same, though there are some prominent people who disagree (Aaron Patterson).
|   371551 [ken.egervari] at
|   371553 [josh.cheek g] You really come across like the kind of person who goes to Japan and says
+ 371541 [scott aitrus] For starters - http://en.wikipedia.org/wiki/TMTOWTDI
| 371543 [devguy.ca gm] good one!
+ 371566 [fxn hashref.] * parentheses around parameters in method definitions, and around
+ 371613 [tony.arcieri] For the most part dropping optional parens as much as possible is the
+ 371747 [code apotheo] "Parenthesis" is singular.  "Parentheses" is plural.  The second sentence

^ tkri
371535 [devguy.ca gm] does anyone have this working?
371770 [rogerpack200] appears you don't have some "ruby tk" package or other installed?

^ Testing for subarrays
371552 [michel demaz] I want to check whether a given array contains a given subarray and
371555 [jgabrielygal] ray
+ 371560 [michel demaz] Yes !
+ 371561 [dblack rubyp] This message is in MIME format.  The first part should be readable text,
  371567 [michel demaz] Comparing with my original proposal, a side question is whether using
  371568 [michel demaz] sub("that", "than"), sorry

^ Some newbie questions - bare with me ;)
371554 [ken.egervari] Question 1
+ 371556 [w_a_x_man ya] You should have written "bear with me".
+ 371557 [jgabrielygal] It's a Symbol.
| 371562 [ken.egervari] Ah, thanks for all of those answers. It helps very much. I didn't know
| 371565 [shortcutter ] But please note that #== in Ruby is not the same as == in Java.
+ 371563 [stefano.croc] It is a Symbol. Symbols are sequences of characters with the property that
threads.html
top