412274-413403 subjects 412684-414325

trying to make MIN MAX sorting array; I want to print the min and max #s of the array
412463 [lists@ru y- ] I'm not looking for anyone to GIVE ME the answer/ do homework for me.
+ 412464 [thomasmurphy] Here's a hint. Rather than looping through the array as is and trying to pic=
+ 412465 [abinoam@gm i] So, the direction...
| 412466 [matthew@ke w] Point of order: it's always as fast or faster to iterate once than to sort.
| 412470 [shortcutter@] In theory, yes.  In practice since many Array methods are implemented
| 412473 [johndapps@gm] i am sure this has been asked before, but I am going to ask again, sorry!
| 412477 [shortcutter@] This is a completely different subject. Please start a new thread and
+ 412475 [mike@st k. a] ________________________________________________________________________
| 412476 [mike@st k. a] Oops, you were printing the indices of the min and max values, and as =
+ 412517 [lists@ru y- ] I actually had to NOT use the Min and Max methods. Rather, I have to
| 412533 [shortcutter@] Well, then iterate the Array once and record min and max as you go.
+ 412646 [lists@ru y- ] I almost made it work. I don't know how to call my method. Could I have
| + 412650 [johnmoonyy@g] In Ruby there is a method called min and max that you can call on arrays.
| + 412675 [abinoam@gm i] 1) The for loop doesn't work like you are expecting.
|   412676 [abinoam@gm i] 1) The for loop doesn't work like you are expecting.
+ 412678 [lists@ru y- ] p [3,2,1].minmax
  412679 [abinoam@gm i] "I actually had to NOT use the Min and Max methods. Rather, I have to

How do I extract values from nested JSON?
412479 [lists@ru y- ] data = JSON.parse(data)['info']
+ 412482 [lists@ru y- ] Got it to work with
+ 412483 [lists@ru y- ] To clarify further....
| 412485 [ammarabuali@] On Dec 1, 2013, at 11:44 AM, Dr.Mohamed Ajmal A. <lists@ruby-forum.com> =
+ 412487 [lists@ru y- ] thanks Ammar got it working similarly

[ANN] Tork 19.5.0 - test with fork
412481 [sunaku@gm il] 1. Absorbs test execution overhead into a master process.

Lottery generation script
412486 [lists@ru y- ] #ticket database
+ 412488 [abinoam@gm i] You can begin by trying to catch the repetitions at the code and
+ 412500 [lists@ru y- ] So, I updated the coda a bit -
| 412508 [abinoam@gm i] I understand your anxiety to see the result you're searching for.
| 412511 [abinoam@gm i] I've played a little more with your code.
+ 412534 [lists@ru y- ] I found this interesting so I thought I'd have a go at using OOP and DRY

watir question
412489 [lists@ru y- ] Is there anyway could I able to press the index of the current browser?
+ 412490 [lists@ru y- ] irb(main):007:0> b1.windows.count
+ 412491 [lists@ru y- ] yes this is what I want. Thank you so much.
+ 412492 [lists@ru y- ] begin
+ 412493 [lists@ru y- ] if i print $browser.windows.index then it's printing
+ 412494 [lists@ru y- ] You need to pass an argument to #index: the browser object you want the
+ 412495 [lists@ru y- ] if i write the code like
+ 412496 [lists@ru y- ] You still haven't shown the error message, despite mentioning it twice.
+ 412497 [lists@ru y- ] oh extremely sorry. I was about to paste the error message but
+ 412498 [lists@ru y- ] "browser" as a method does not appear anywhere in the code you have
+ 412499 [lists@ru y- ] ok i have written the below code
+ 412501 [lists@ru y- ] The error message is incomplete, and so is your code.
+ 412568 [lists@ru y- ] puts $browser.windows.index($browser)
+ 412577 [lists@ru y- ] I don't have that version of watir-classic. Can you try updating the gem
+ 412578 [lists@ru y- ] I am very sorry to say that Updation to the higher version of Ruby or
+ 412579 [lists@ru y- ] This looks like a bug which was fixed at some point between 3.0.0 and
+ 412580 [lists@ru y- ] Oh ok thank you. I will try to update in future as soon as this project

The Ruby Object Model
412502 [lists@ru y- ] It seems that Ruby lacks the diagram of a core object model. The only
+ 412503 [jgabrielygal] Nice !
| 412505 [jgabrielygal] Just for my own education: ARGF is an object of a class that is
+ 412504 [lists@ru y- ] Jesus, thank you for good recomendations, I will make an update soon.
+ 412506 [lists@ru y- ] I think I should change something because of many red lines.
| + 412507 [jgabrielygal] ZBmOZFL-0/s1530/Ruby.png
| | 412543 [stu@ru yp og] I want to make one. How do I do that? I want to make an interactive one!
| + 412582 [quintus@qu n] ZBmOZFL-0/s1530/Ruby.png
+ 412551 [lists@ru y- ] UnfortunatelyI can't say what tool should you use to create interactive
| 412553 [shortcutter@] Artem, you could generate SVG - it has some interactive capabilities.  Or HTML5.
+ 412554 [lists@ru y- ] Yes, it is possible to export from Gliffy to svg, but the problem is
+ 412583 [lists@ru y- ] its in the wrong group
+ 412584 [lists@ru y- ] Hans, thank you, corrected.
+ 412585 [lists@ru y- ] Vale, do what you what to do. WTFPL license.
| 412599 [ryand-ruby@z] I have no idea what the one green line is supposed to represent.
| 412602 [lists@ru y- ] Yeah, I think that's what the one green line is supposed to represent.
| 412604 [lists@ru y- ] Unfortunately I didn't understand what you think is wrong here. It is
| 412606 [lists@ru y- ] I never said it was wrong. ;)
+ 412601 [lists@ru y- ] "unknown", ENV and ARGF were taken from http://ruby-doc.org/core-2.0/

Error: #<NameError: undefined local variable or method
412509 [lists@ru y- ] #<NameError: undefined local variable or method `field_build' for
+ 412512 [ruby-talk@la] You are calling the field_build method directly from within the
+ 412563 [lists@ru y- ] Thank you, Lars, problem is solved!

[ANN] Tork 19.5.1 - test with fork
412510 [sunaku@gm il] 1. Absorbs test execution overhead into a master process.

ANN: Sequel 4.5.0 Released
412513 [lists@ru y- ] Sequel is a lightweight database access toolkit for Ruby.

Started out with ruby, but have some regrets. Not sure what to do. Help?
412514 [lists@ru y- ] So, to start, I basically returned to college for a second degree
+ 412516 [matt@te hn r] I've built web spiders in the past, but that was a decade ago.  These days
+ 412522 [groups@in ox] Mechanize (http://mechanize.rubyforge.org/) is perfect for this. I've used
| 412523 [jarodzz@gm i] second mechanize
+ 412527 [lists@ru y- ] Ruby is well suited to website interaction. Indeed, it's a language I
+ 412537 [rubytalk2dav] You're going down a perfectly fine path... but don't take just one.
| 412538 [wulove5@gm i] Thx=A3=ACthat's just take a lifelong time.
+ 412541 [tamouse.list] Did I talk to you on irc last night (my irc nick is "pontiki") ?
| 412542 [stu@ru yp og] What's to regret? Grok the concepts not the syntax! Ruby is conceived from
+ 412544 [lists@ru y- ] Thanks for the responses (thanks for that too Dave, that was really

ENV['LD_LIBRARY_PATH'] setting in Ruby don't take effect in csh env
412520 [lists@ru y- ] Aassume the value of $LD_LIBRARY_PATH is "/usr/dt/lib:/usr/local/lib".
412521 [fluido@fl id] I am not familiar with csh, but it has to be that you have some

Re: ENVsetting in Ruby don't take effect in csh env
412524 [lists@ru y- ] Dear Carlo,
412525 [lists@ru y- ] Dear Carlo,
412526 [fluido@fl id] I took the time to download csh to have a look... Apparently, if you
+ 412529 [lists@ru y- ] Too bad¡¤why add "-f" option without influence? Why I still get the content for the virable of LD_LIBRARY_PATH that defined in .cshrc? I run with "csh -f test.csh".
+ 412530 [lists@ru y- ] Dear Carlo,
| 412531 [fluido@fl id] This has nothing to do with ruby. If you run test.csh from csh, it
| 412535 [lists@ru y- ] Thanks a lot, Carlo, you're right, this is most likely shell/subshell
+ 413069 [lists@ru y- ] Dear Carlo,

`require': cannot load such file
412528 [lists@ru y- ] git clone https://github.com/cucumber/cucumber.git
412611 [abinoam@gm i] Dear Joachim,

[ANN] Rails 3.2.16 and 4.0.2 have been released
412539 [tenderlove@r] Rails 3.2.16 and 4.0.2 have been released!

[ANN]: Stockboy - a data capture and manipulation gem
412540 [andrew@av t.] Stockboy helps you receive and unpack data onto your shelves.

Create a scope that groups unique id and recent date
412546 [lists@ru y- ] I want to write a scope that returns the most recent (created_at) row
+ 412547 [abinoam@gm i] Sorry, I just don't know how to do it.
+ 412552 [shortcutter@] SELECT t.id, t.person_id, t.created_at

Purchase discount golf umbrellas at Cs-umbrella.com
412548 [lists@ru y- ] If you're buying an golf umbrellas as a gift, be conservative in the
+ 412549 [tamouse.list] I am so glad I now have this vital information so I can choose the correct
| 412550 [wael@un k. a] HHHH, does it work on rails 4 ?
+ 412591 [lists@ru y- ] This thread should be deleted because it is spam.

Method for checking syntax.
412555 [lists@ru y- ] Is there any method to do syntax checking of a specific block but not
+ 412556 [lists@ru y- ] If the code allows it, you could isolate the block into a separate file
+ 412565 [tamouse.list] Could you perhaps explain a little of why you want to do this? If you want
| 412566 [ryand-ruby@z] On Dec 4, 2013, at 16:25, tamouse pontiki <tamouse.lists@gmail.com> =
| 412567 [tamouse.list] Sure, just like you can do with irb and pry. :P
| 412633 [ryand-ruby@z] On Dec 4, 2013, at 20:52, tamouse pontiki <tamouse.lists@gmail.com> =
+ 412569 [lists@ru y- ] Actually, I want to separate out parsing(for syntax checking) and
| 412575 [shortcutter@] irb(main):007:0> code = '1 + 2'
| 412634 [ryand-ruby@z] On Dec 5, 2013, at 1:14, Robert Klemme <shortcutter@googlemail.com> =
| + 412655 [shortcutter@] This is nice!  Thank you for that.
| + 412656 [joelvanderwe] def check_syntax_unsafe src
|   412664 [shortcutter@] Very good point!  I'd prefer my approach with the lambda because that
|   412681 [joelvanderwe] Only if you really trust the input code...
|   412682 [shortcutter@] Dang!  I should think more next time.
|   412683 [abinoam@gm i] +1 cleverness for Joel VanderWerf!
+ 412581 [lists@ru y- ] Thanks  Robert Klemme :)
+ 412613 [stu@ru yp og] in your repl you can read in the current file and parse with regex. Pry has
+ 412700 [lists@ru y- ] begin; eval(code); rescue Object; $!; end }.value; p 42'   "... blech"
| 412701 [joelvanderwe] ruby -e 'code = ARGV.shift; p Thread.new(code){|code| $SAFE = 12;
| 412705 [thyagobr@gm ] I'm sorry, guys, this wrapped around my brain and I couldn't unwrap it so
| 412706 [jgabrielygal] It is to ensure that you don't execute the code just yet. You want
+ 412724 [lists@ru y- ] You can create a tempfile and then run
| 412741 [stu@ru yp og] Why wouldn't that work on windows? Better yet which non-mri ruby are you
+ 412743 [lists@ru y- ] referring to?

Ruby Regex - Unable to capture specific data
412557 [lists@ru y- ] I have several strings of data, which are all very similar, however I
+ 412558 [jgabrielygal] strings = ["/software/$$$PROTO.HIV/Microsoft/Windows
| 412561 [mike@st k. a] On Dec 4, 2013, at 11:50 AM, Jes=FAs Gabriel y Gal=E1n =
| 412573 [shortcutter@] That's almost exactly what I'd do.  It's just lacking the anchor at
+ 412559 [ammarabuali@] The scan method might be a better tool for this job. Then all you have =
+ 412560 [lists@ru y- ] Jesus - this still returns all strings for me in Ruby 1.9.
| 412562 [jgabrielygal] 1.9.3p448 :027 > re = /\/software\/([^\/]*)\/Microsoft\/Windows
| 412564 [tamouse.list] ...
+ 412616 [lists@ru y- ] Jesus,

each loop question
412570 [lists@ru y- ] Can I use each loop to print alternative element without giving any 'if
+ 412571 [jgabrielygal] I don't understand the logic. If you want to skip one element each
+ 412572 [lists@ru y- ] you are right, 5 should not be there, I made a mistake and gave the code
| 412574 [shortcutter@] irb(main):006:0> puts 2.step(5, 2).to_a
+ 412576 [lists@ru y- ] Thank you, that's an another beautiful way.

map (collect) not doing what it should
412586 [lists@ru y- ] example 1 works, I tried to avoid being repetitive and I got example 2
+ 412587 [lists@ru y- ] You're mapping the array containing a,b, and c; but you don't keep that
+ 412588 [lists@ru y- ] what do you know,
| + 412589 [lists@ru y- ] a = [5]
| + 412590 [ruby-talk@la] Fixnum objects are immutable, ie. they never change.
| + 412595 [shortcutter@] You want String#upcase! and Array#each then, because apparently you
| + 412618 [justincollin] There is a fundamental misunderstanding here of how Ruby variables work.
+ 412598 [lists@ru y- ] I don't want to upcase, that was just example.
| 412600 [ryand-ruby@z] Having that many variables is a design smell, esp when it seems that =
+ 412603 [lists@ru y- ] Are you able to provide an excerpt from your real code? Perhaps a
+ 412610 [lists@ru y- ] haha, I don't really have 26 variables ... I have only three ... but I
| 412612 [stu@ru yp og] ["aaa", "bbb", "ccc"].each do |something|
+ 412615 [lists@ru y- ] fixnum * integer --> numberic_result

System Command not passing output to a value
412592 [lists@ru y- ] I'm trying to write a script that will take the output of a system
+ 412593 [shortcutter@] You cannot nest string interpolation.  Try
| 412596 [justincollin] Certainly you can nest string interpolation, although it's silly in this
| + 412597 [lists@ru y- ] Thank you for that information, it definitely sheds some light on that
| | 412605 [justincollin] `#{"ruby -v"}` is the same as `ruby -v`
| + 412630 [shortcutter@] Thank you for correcting me!  I was too quickly glancing over the
+ 412594 [lists@ru y- ] From the IRB responses, it looks like the command "python -V" is

[ANN] omnifocus-github 1.7.0 Released
412607 [ryand-ruby@z] omnifocus-github version 1.7.0 has been released!

[ANN] minitest 5.1.0 Released
412608 [ryand-ruby@z] minitest version 5.1.0 has been released!

[ANN] hoe 3.7.2 Released
412609 [ryand-ruby@z] hoe version 3.7.2 has been released!

how to pick failed element in ruby
412617 [lists@ru y- ] ruby,
412649 [stu@ru yp og] A failed element? Do you mean an error? Please explain exactly what's
+ 412659 [lists@ru y- ] I am running a script in ruby. If my scripts fails i want to store the
+ 412662 [justincollin] See https://www.ruby-forum.com/topic/125107#1129823
  412663 [lists@ru y- ] begin
  412665 [hmaddocks@me] Works for me

[ANN] JRuby 1.7.9 Released
412631 [tom.enebo@gm] The JRuby community is pleased to announce the release of JRuby 1.7.9

I Love Ruby - update
412632 [lists@ru y- ] Have added Metaprogrming section to my free(dom) ruby book I Love Ruby.
+ 412635 [lists@ru y- ] nice start, it will be better when it contain wisdom than knowledge
| 412638 [stu@ru yp og] wow, none none, your passive aggressive troll may be optimally parsed with
+ 412651 [lists@ru y- ] It seems to be a .pdf.
+ 412653 [lists@ru y- ] I am really lazy. If you want you can get the source of the book here
+ 412657 [benjamin@be ] Have you addressed the issues brought up in your previous release?
+ 412661 [lists@ru y- ] Haven't I?
+ 412672 [lists@ru y- ] I Like that examples and explanations.
+ 412673 [lists@ru y- ] See the "An Important Math Discovery" . I must get the Noble prize for

BigDecimal §Ó ruby
412636 [lists@ru y- ] require 'bigdecimal/math'
412637 [atma@co va e] 1. You can fixate the digits using printf("%f0.5", var); Just like in C.

regex and ruby
412639 [lists@ru y- ] I'm new to Ruby. I'm trying to scan an array for lines that match the
+ 412640 [hassan.schro] Are you new to programming and regular expressions in general?
+ 412641 [matt@te hn r] You could do that with grep if you wanted to.
+ 412642 [lists@ru y- ] yes, I am new.. you gotta start somewhere :)
| 412643 [matt@te hn r] match is a method on regular expressions, so /^\w+\s\d+$/.match(text)
| 412645 [ryand-ruby@z] would be the right syntax
+ 412644 [lists@ru y- ] good points Matt.. great thanks.
+ 412647 [stu@ru yp og] ...
  412648 [stu@ru yp og] c= <<-EOF

Get first entries of case / when menus
412652 [lists@ru y- ] Is there a simple way to get all first entries of a case/when menu?
+ 412658 [tamouse.list] (first_case ||= []) << x
| 412660 [rob.biedenha] ...
+ 412677 [andrew@av t.] You can't do it directly on the case statement but you can store the

Select multiple checkbox
412666 [lists@ru y- ] Please help me to select multiple checkbox like gmail in Ruuby.
+ 412667 [lists@ru y- ] First, we need to know what gem you're using to access gmail.
+ 412668 [lists@ru y- ] I want to access multiple check-box for any website,not only for gmail.
+ 412669 [lists@ru y- ] First we need to know what gem you're using to access any website.

to store hash contents in DB
412670 [lists@ru y- ] I have ruby-code to do read any files and store it in hash. Now I want
412671 [lists@ru y- ] Sounds good. You should totally do that.

[ANN] TeamCity Ruby Client 1.2.0
412674 [lists@ru y- ] teamcity-ruby-client version 1.2.0 has been released!
412689 [pvelez@pr vi] unsubscribe