404113-405465 subjects 404528-410209

Cucumber - Aruba tests with FileUtils vs Dir
404323 [lists@ru y- ] I want to test that a program will trap Errno::EACCES.

what does (({this})) mean?
404334 [lists@ru y- ] I often see posts including bits wrapped in ((%symbols%)) and
404336 [phasis@gm il] According to https://bugs.ruby-lang.org/plugin_assets/redmine_rd_formatter/help/rd_syntax.html
404338 [matthew@ke w] Wonderful, thank you!

Ruby command line options s and S
404344 [lists@ru y- ] Can anyone help me to understand the difference between s and S with
+ 404345 [lists@ru y- ] -s and -S are not related to each other.
+ 404346 [jgabrielygal] -S tells Ruby to look into the $PATH variable when searching for the
| 404348 [lists@ru y- ] @Jesus - nice explanation you have given. Could you tell me how can I see the $PATH contents in UBUNTU ?
| + 404350 [jgabrielygal] $ echo $PATH
| | 404351 [lists@ru y- ] Yeah,I know I tried that also.
| + 404352 [jw1496@at .c] echo $PATH
|   404353 [lists@ru y- ] Thanks @Jamal - but why $RUBYPATH is showing nothing?
|   404367 [sto.mar@we .] Because it's empty or not defined?
|   404368 [lists@ru y- ] Which one is not defined as per your doubt?
|   404380 [sto.mar@we .] Are you kidding?????
|   404386 [me@da id wd ] Dude!
|   + 404397 [lists@ru y- ] Humm!
|   | + 404399 [tony@ob ec f] The general expectation of lists like this, where people try and help =
|   | | 404400 [lists@ru y- ] Thanks Tony for your time to explain me how this list works.
|   | + 404425 [sto.mar@we .] Please keep in mind that you are wasting *our* time when you constantly
|   | | + 404428 [lists@ru y- ] Now it seems I have to be rude on you. What do you think about yourself.
|   | | | 404467 [sto.mar@we .] Of course now and again there are posts by others in this list that
|   | | | 404472 [lists@ru y- ] Thanks for your suggestions... and giving a good directions to keep
|   | | + 404432 [art@ar ta lo] First, if one stops responding, the requests will dry up.
|   | + 404475 [shortcutter@] People have the impression that you try to offload too much learning
|   |   404478 [art@ar ta lo] Ruby is well documented and comes with an interactive facility.  If you =
|   |   404480 [lists@ru y- ] There are questions where I also provided answers which had been posted
|   + 404443 [lists@ru y- ] It's easy to hide behind a pseudonym and come back using a different
|   | + 404455 [me@da id wd ] I=92LL say it that way. QUIT NICKEL AND DIMING THE MAILING LIST!
|   | | 404469 [lists@ru y- ] While I totally agree with you and I've said so in the other thread,
|   | + 404457 [lists@ru y- ] @Abhijit - couldn't understand what do you mean?
|   + 404466 [lists@ru y- ] @my-ruby I didn't expect you to understand. If you did, @ddd wouldn't
|   | 404471 [lists@ru y- ] You also had posted ... I have seen. You could Google that. Why then
|   | + 404473 [lists@ru y- ] Don't make a fool of yourself, mate. Learn from your mistakes and move
|   | + 404474 [lists@ru y- ] @Joel - I like polite "scold" but not the "harsh" way. So no worry!
|   | + 404482 [lists@ru y- ] "Never argue with an 1d10t; he will bring you down to his level and win
|   + 404483 [lists@ru y- ] No flame wars. Didn't you understand the quote about arguing you just
+ 404361 [lists@ru y- ] Another confusion here I am having
| + 404366 [sto.mar@we .] Please google 'ruby shebang'
| + 404369 [lists@ru y- ] name.
+ 404365 [lists@ru y- ] please help me here to understand me confusion. :(

How to exit from the forever loop when using "-np" switch ?
404349 [lists@ru y- ] I was trying to see the how they(-n,-p) works in ruby?
+ 404354 [shortcutter@] It will read until EOF.
| 404355 [lists@ru y- ] I didn't undersatnd, I mean how to return from here. It continues to the
| 404357 [shortcutter@] Cheers
| 404358 [lists@ru y- ] Okay! So any other way to test such -n -p options?
+ 404363 [lists@ru y- ] `-p` ==> assume loop like -n but print line also like sed.

WEBrick proxy - https reqrite question
404356 [uzleepito@gm] I have a small proxy server here (using WEBrick::HTTPProxyServer) that

Confusion with Ruby command line options
404370 [lists@ru y- ] Can any one help me to understand when and how to use the below two Ruby
+ 404378 [sto.mar@we .] Please STOP asking us to rewrite the documentation just for you!
+ 404404 [lists@ru y- ] From the
+ 404405 [lists@ru y- ] its because #{$/} uses to_s but you need the inspected stuff
| 404406 [lists@ru y- ] Thank you very much! @Hans
| 404411 [lists@ru y- ] here is: "\n\n"
+ 404431 [lists@ru y- ] From the above link :- http://www.december.com/html/spec/ascii.html
+ 404435 [lists@ru y- ] =============

Error is coming with ruby commandline option "-d"
404371 [lists@ru y- ] I was trying to play with -d option in Ruby. But getting the below
404374 [matma.rex@gm] That's simply what -d does  it prints all exceptions that ever happen in your code, even if they are rescued.
404376 [lists@ru y- ] even if they are rescued. <~~~~ Could you explain this line more elaborately?
404381 [sto.mar@we .] could you google "ruby rescue exceptions"?
404393 [lists@ru y- ] Yes I know what is "rescue", rather I asked the explanation - "it prints all exceptions that ever happen in your code, even if they are rescued."
404396 [ryand-ruby@z] Do you realize that you've burned most of your bridges here, right?

file size of each item in file list
404372 [lists@ru y- ] I am trying to take the contents of a file which contains the results of
+ 404373 [lists@ru y- ] File.read("/tmp/lg_files") do |f|
+ 404375 [lists@ru y- ] This is what I have now.   I am not able to print out each line of the
| 404379 [hassan.schro] You've commented out the contentsArray.push line which insures
| 404419 [shortcutter@] Even worse: File.read will ignore the block.  It's simply never
| 404420 [lists@ru y- ] I didn't notice this, it should have been
| 404421 [rob@ag le on] If you want the entire set of lines, just use
+ 404390 [tamouse.list] Is this just an partial step to doing something else? Because to do
+ 404424 [lists@ru y- ] Hah, Ruby's always one step ahead of me :p

Can't load gems
404382 [lists@ru y- ] I have installed rvm on my Mac OSX and Ruby 1.9.3 and I also installed
404383 [ryand-ruby@z] To start, make sure that `which gem` and `which ruby` are answering with =
404389 [lists@ru y- ] Sure, thanks.
404394 [ryand-ruby@z] with
+ 404395 [ryand-ruby@z] action_mailer.rb=20
+ 404422 [lists@ru y- ] Thanks Ryan, for that help.  Actually, I was just using actionmailer as
  404426 [ryand-ruby@z] Lets assume that your rubygems is not borked, yet.
  404430 [lists@ru y- ] borked ???
  404441 [ryand-ruby@z] behaves=20
  404449 [lists@ru y- ] I gather that you see something wrong with the gemspec, though you don't

[ANN] flay 2.1.0 Released
404384 [ryand-ruby@z] flay version 2.1.0 has been released!

[ANN] flay-persistence 1.0.0 Released
404385 [ryand-ruby@z] flay-persistence version 1.0.0 has been released!

Ruby Multithreaded producer-consumer problem
404387 [lists@ru y- ] I started on Ruby less than a week ago but have already come to
+ 404388 [tony.arcieri] Tony Arcieri
| 404408 [lists@ru y- ] Thanks but no. As I mentioned, I am new to Ruby and am practicing. A
+ 404392 [fluido@fl id] Instance variables are only accessible from within methods. Lines
| 404409 [lists@ru y- ] After making the changes you suggested and adding joins inside class
| 404427 [ryand-ruby@z] That's great. That's the real problem the author wants you to solve. Sit dow=
| 404434 [lists@ru y- ] If I were able to figure out the issue myself, why would I be sitting
| 404442 [ryand-ruby@z] Sit
+ 404454 [lists@ru y- ] result. I used 2 ConditionVariable, same result :( If it's not working,
| 404484 [lists@ru y- ] How much have you tried? Your description not showing that.. You should
| + 404485 [me@da id wd ] You don=92t get to start telling people that after all the un-googled,
| | + 404487 [me@da id wd ] Can you show the MonitorMixin complete error? I=92m finding it interesting
| | | + 404521 [lists@ru y- ] I posted it in my original post. I am not sure of the difference between
| | | + 404910 [shortcutter@] MM vs. Monitor only helps with reentrancy. Deadlocks are usually an
| | + 404497 [lists@ru y- ] Who are you to tell me what I get to do? You've an opinion, that's fine,
| |   + 404499 [ryan@ra to m] I think he was talking to "Love U Ruby" not you...which means all of his
| |   | 404502 [lists@ru y- ] Well he started a thread using the question I posted, so it's hard to
| |   | 404506 [tony@ob ec f] I agree with Ryan, maybe it's the difference between seeing the threads =
| |   | 404514 [lists@ru y- ] If that's so, I've no problem apologizing to DDD. I was taken by
| |   + 404500 [fluido@fl id] What nostalgia! It was AGES since I could witness a REAL, sparkling
| + 404501 [lists@ru y- ] Look who's talking :) the 1d10t trying to get even because he got
|   404504 [lists@ru y- ] Don't make me rude on you. don't think yourself master on that. because
|   404505 [lists@ru y- ] No one said anything about slapping you, though you have it coming for
|   404509 [lists@ru y- ] Don't try to escape and you made that comments first. This is English
|   404513 [lists@ru y- ] Whoooosh...
+ 404522 [lists@ru y- ] Entering Orange picker sync block...Entering age increaser sync block...
| 404552 [me@da id wd ] I was squarely aiming that at Love U Ruby, NOT you. My apologies if I
| 404553 [me@da id wd ] Yes, definitely a difference. I=92m not looking at the forum at all, I=92m
| 404554 [me@da id wd ] You are correct, I was aiming that squarely at Love U Ruby. My apologies if
| 404555 [me@da id wd ] hehe, yeah. Difference between web and the mailing list software Id
+ 404896 [lists@ru y- ] Bump!
  + 404912 [shortcutter@] Just so we are sure we are all on the same level, can you please
  + 404915 [sean.ohalpin] I've created a gist at https://gist.github.com/seanohalpin/5023887
    + 404919 [sean.ohalpin] s/DCell/Celluloid/
    + 404930 [lists@ru y- ] First of all, Sean's modified version works!. It does not run into the
      404935 [shortcutter@] Worker@next_run
      + 404950 [sean.ohalpin] I think we must have been looking at different versions of the code -
      | 404961 [shortcutter@] Too bad.
      | 404967 [sean.ohalpin] Ah yes - thanks. I have a bad habit of thinking of integer read/writes
      + 404954 [lists@ru y- ] It seems that you are looking at the Monitor version of the code. I was

Novice: Database access. DBI, Activerecord.
404401 [lists@ru y- ] I have been playing with a Ruby tutorial and so far that has focused on
404402 [jgabrielygal] Or you could try a generic interface. I have no experience with DBI. I

Workshop @LARubyConf: Going Beyond Rails - Scale Non-synchronically
404403 [lists@ru y- ] Thursday, February 21, 2013 from 1:30 PM to 6:00 PM (PST)

Best DRY way to write bang versions of methods?
404407 [lists@ru y- ] I've been wondering about the best way to quickly create a "bang"
+ 404410 [edd.rossi@gm] def foo(something)
| + 404412 [lists@ru y- ] @Rossi `+1` to you.
| + 404418 [shortcutter@] There is one gotcha in this code: foo! will often return nil if
+ 404413 [lists@ru y- ] That's an interesting way to do it. If I assume that any bang method I
| 404414 [edd.rossi@gm] Yup!
+ 404415 [lists@ru y- ] something like that?
+ 404423 [lists@ru y- ] Hah, Ruby's always one step ahead of me :p

New gem: breaktime
404416 [lists@ru y- ] I wanted to introduce my new gem, breaktime.
404417 [lists@ru y- ] Nice one! it is.

What are lambda functions used for?
404429 [lists@ru y- ] I'm new to Ruby and lambda functions.  I understand how they work but
+ 404433 [roshkins@gm ] Lambda functions are used when you want to call a function that doesn't
+ 404436 [lists@ru y- ] Ok, that makes sense.  Om, would you be able to post the Ruby code for
| + 404437 [jgabrielygal] l = lambda {|x| p x}
| + 404439 [roshkins@gm ] #Okay.
+ 404489 [lists@ru y- ] I find them useful when I'm writing scripts that automate tasks. I'll

Re: Unsubscribe confirmation request
404438 [shados@sh do] Confirmed.

if file exists then move
404444 [lists@ru y- ] I have been googling and am not sure how to approach this.  I have a
+ 404447 [roshkins@gm ] /hist_sar\d+-\d+-\d+\.tar/
+ 404448 [zettabyte@gm] if Dir["/path/to/file/hist_sar*.tar"].empty?

[ANN] minitest 4.6.1 Released
404445 [ryand-ruby@z] minitest version 4.6.1 has been released!

[ANN] RubyInline 3.12.1 Released
404446 [ryand-ruby@z] RubyInline version 3.12.1 has been released!

I installed the mongrel prerelease
404450 [roshkins@gm ] Dear People of Rubyland,
404451 [tony.arcieri] Mongrel is unmaintained. The prerelease you are referring to is from 2010.
404452 [roshkins@gm ] thank you

skip iteration in each loop
404456 [lists@ru y- ] I want to skip iteration for few values depending on dynamic condition.
+ 404458 [lists@ru y- ] Okay! So do you want the original array intact or output to hold in a
| 404459 [lists@ru y- ] The output should be in a different array.
+ 404460 [lists@ru y- ] I doubt this is the best method, but here's one way to do it
| 404461 [lists@ru y- ] [].tap do |a|
| 404462 [adam@ap es o] A good rule of thumb when dealing with a "primitive" like an Array: if
+ 404463 [lists@ru y- ] You could use Array.partition for that if you wanted both outputs as
+ 404465 [botpena@gm i] try manual iteration, ri next
| 404477 [shortcutter@] irb(main):001:0> persons = [1,2,3,4,5,6,7,8]
+ 404476 [art@ar ta lo] Can you explain the dynamic condition?  Your example has been solved by =
+ 404571 [lists@ru y- ] Thanks everyone. Robert's solution has helped me in solving my problem.

Ruby "visionary" code
404464 [lists@ru y- ] I found that code in the actual codebase of a web app I'm working on.
+ 404479 [shortcutter@] Cheers
+ 404481 [lists@ru y- ] I don't know - you might expect something from the below to explain
+ 404490 [lists@ru y- ] The second one has been written only for a conditional validation (in
  404493 [alexg@ru ge ] It's quite common in Ruby to alias methods if that improves
  404507 [shortcutter@] Absolutely agree!  I also find the "is_a_" prefix ugly - usually where

Two similar sentences have different behaviour. Is it ok?
404468 [laise@pi em ] Two similar sentences have different behaviour. Is it ok?
404470 [lists@ru y- ] its because is the first sample a= is parsed first so it knows that its

[from BASIC to Ruby] so, what's the proper way to replace funcionality of GOTO ?
404491 [lists@ru y- ] I need to make few scripts for tasks I do often manually, but last time
+ 404492 [lists@ru y- ] Yes, It has. You can try "catch - throw" in Ruby's world.
| 404494 [ryan@ra to m] Love U Ruby: I'm really not sure what you meant by that response, but
| 404520 [ryand-ruby@z] You're wrong.
| 404523 [ryan@ra to m] Yeah, I realized that...still doesn't make him right :-)
| 404525 [matma.rex@gm] Actually this makes him pretty much the definition of right.
| 404526 [ryan@ra to m] ...
| + 404527 [matma.rex@gm] When one is implementing a command-line interface like this one, and you don't want to have a dozen of two-line methods, judicious use of throw..catch is a reasonably nice solution.
| | 404531 [tamouse.list] people, people.
| + 404530 [garthy_lmklt] I just wanted to say that I think Ryan is attempting to steer the OP in
+ 404508 [lists@ru y- ] Be careful saying "no one uses BASIC nowdays". I have no doubt there is
| 404512 [lists@ru y- ] Actually I like FreeBASIC, it's cross-platform, syntax I'm somewhat
| 404515 [wishdev@gm i] Baseline - you are certainly free to move to classes or any other concepts
+ 404510 [jw1496@at .c] There is no one way to replace GOTO.  GOTO is at the heart of many structured control structures.  What you need to do is think about what you are trying to do and where you are trying to go when you are done.
+ 404538 [lists@ru y- ] hash inside hash menus, interesting, same as Robert Klemme's example ...
  404540 [shortcutter@] There is one difference: I created a class while the other example
  404546 [tamouse.list] All very true. My initial thought was to refrain from jumping directly

Re: so, what's the proper way to replace funcionality of GOTO ?
404495 [lists@ru y- ] before going to challenge other you should "GOOGLE" - here I did for
404496 [ryan@ra to m] I did consider jokingly showing the "enable jokes" compiler flag that
+ 404498 [lists@ru y- ] OP asked is it there? I have given the reference to him- yes Ruby has. i
+ 404511 [jw1496@at .c] I think GOTO gets a bad rap.  Actually, I find the COMEFROM command far more terrifying.  It's mentioned in the comments...
  + 404516 [lists@ru y- ] Firstly, I know what are Functions/Methods, but I find GOTO much easier
  | 404518 [shortcutter@] Where's the difference?  With a GOSUB the RETURN will also take you to
  + 404567 [tigre7t@gm i] i recall the Amiga thrived on tons of GOTO 's
    404662 [stu@ru yp og] callcc is one way to do a functional programming style goto statement
    404663 [tigre7t@gm i] hey thanks for the heads up
    404704 [stu@ru yp og] You can also teach it to read and parse what you intend it to do.

How do you associate the items of a collection instance with the collection in a smart Ruby way?
404517 [lists@ru y- ] This is a conceptual question about Ruby. I think I may be thinking of
+ 404519 [jgabrielygal] So a FormItem belongs to one Form, and you want it to be able to read
+ 404524 [lists@ru y- ] Thank you for taking all that time Jesus.
  404545 [shortcutter@] Then how do you access them (e.g. in #each) if they are created in