405552-406109 subjects 406015-408940

Selenium. catching Body class value
405820 [lists@ru y- ] I have a site where my script changes language on the site. To verify
+ 405821 [lists@ru y- ] You can use `XPATH` with "selenium-webdriver". I hope that will work.
| 405888 [lists@ru y- ] Thanks for your reply! You can see the html below.
+ 405822 [lists@ru y- ] If you give the HTML to Nokogiri you should be able to search it much
+ 405825 [tamouse.list] If you assign test to the element, instead of just the text of the
  405889 [lists@ru y- ] A big thank you!! It worked to use test[:class] :D

Rails 3 How to assign the value to nested attributes before calling save in update action
405823 [lists@ru y- ] I am using Rails 3.0.9 and Ruby 1.9.2

Retrieves the count for the list of entries - not working
405828 [lists@ru y- ] def get_entry_count(type)
+ 405829 [tamouse.list] This is probably the source of your error ^^ what is being returned by
+ 405830 [lists@ru y- ] Ideally i would not want that to be sent out but we have been asked to
| 405831 [tamouse.list] Ok, send out the message, but return something more meaningful in that context?
+ 405832 [tamouse.list] Aslo, Syed, I hope you don't mind, I'd like to offer something a
+ 405834 [lists@ru y- ] I dont mind at all I am still learning ruby and I appreciate your help

error with selenium-webdriver
405833 [lists@ru y- ] I am getting error with "selenium-webdriver". Any advice on that?
+ 405835 [sto.mar@we .] Please edit your posts to contain only the absolutely necessary
+ 405836 [lists@ru y- ] It's basically I means Ruby 2.0 is not working with
+ 405837 [lists@ru y- ] I tried selenium-webdriver with Ruby 2.0 as well and got the same error.
+ 405838 [wishdev@gm i] So I'm certain you will follow none of the concepts shown below past 4
+ 405840 [lists@ru y- ] I was actually trying to write a script which will delete the files from
+ 405906 [lists@ru y- ] Can anyone help me with the above confusions?
+ 406077 [lists@ru y- ] undefined method `getAlertText'

Different behaviour of control-c for 1.9.2-p290/2.0.0-p0
405842 [lists@ru y- ] why can the following example code be successfully stopped by control-c

IO buffering problem
405844 [wagner.andre] All,
+ 405846 [garthy_lmklt] Is it possible that you aren't processing one of the commands from the
| + 405847 [garthy_lmklt] Sorry, *third* last line.
| + 405848 [wagner.andre] Thanks for the response. I really don't have to handle every incoming
|   405849 [wagner.andre] Ha, I fixed it. You were almost right, Garthy, the UI was
|   405850 [garthy_lmklt] Happy to be able to help, even if only indirectly. :)
|   405851 [wagner.andre] Yep, I think you're dead-on right. Thanks again.
|   405852 [garthy_lmklt] No problem at all. :) I hope to have the opportunity to be utterly
+ 405891 [shortcutter@] At top of script

RubyVM::InstructionSequence compiling and loading
405854 [mikeowens@gm] I recently came across "An Amateur Smalltalk User's Observations on
+ 405876 [mikeowens@gm] #!/usr/bin/env ruby
| 405877 [mikeowens@gm] 44c44
+ 412016 [lists@ru y- ] I think this is the bug: https://bugs.ruby-lang.org/issues/7995

combine two regular expressions
405855 [lists@ru y- ] How to combine the two regular expressions into one?
+ 405856 [lists@ru y- ] * \( and \) match literal '(' and ')' characters.  In Ruby regex you
+ 405857 [lists@ru y- ] This is a splendid answer, thanks for all the insights.
| + 405858 [lists@ru y- ] No worries.
| + 405859 [lists@ru y- ] Yes @ Matthew Kerwin is awesome to deliver the things from the very
+ 405864 [lists@ru y- ] It depends what you mean by combine. If you want to match either then
  405870 [jgabrielygal] And if you have to work with the original regexps, you can use the

confusion with Ruby's enum#inject
405860 [lists@ru y- ] From the doc about the syntax : inject {| memo, obj | block } вк obj

confusion with Ruby's enum#inject
405861 [lists@ru y- ] From the doc about the syntax : inject {| memo, obj | block } -> obj
405862 [lists@ru y- ] [1,2,4,3].inject(:+)

Fiber and embedding differences in 1.9.2 versus 1.9.3 series
405868 [garthy_lmklt] I don't suppose anybody knows much about the differences in Fiber
406037 [garthy_lmklt] Darn- no responses. Well, worth a shot. Thanks to anyone who considered

control the concurrent thread numbers
405869 [lists@ru y- ] I'd like to run total 10 threads concurrently, but from the printed
+ 405871 [jgabrielygal] The thread that calls join suspends its execution until the joined
| 405873 [lists@ru y- ] You are right, I'm trying to consume the array simultaneously. But after I move the join out of loop, it still has problem. How to fix it?
| 405874 [adam@ap es o] Every thread is executing code wrapped in a mutex, so only one thread
| 405875 [lists@ru y- ] The real problem is that there are plenty of files on disks and a long
| + 405882 [lists@ru y- ] As Joel said, partition the array outside the threads.  I made a tiny
| + 405890 [shortcutter@] That's a *very* inefficient way to partition the work because you will
+ 405872 [lists@ru y- ] Because you're joining each threat before moving to the next one. You
+ 405878 [lists@ru y- ] split the array before using threads.

ObjectSpace._id2ref is giving different type output on Ruby 1.9.3p392 and Ruby 2.0.0p0 ?
405880 [lists@ru y- ] Couldn't understand - Why does `ObjectSpace._id2ref` giving different
405881 [lists@ru y- ] already fixed in ruby-trunk

[ANN] Ruby-GNOME2 1.2.3
405883 [kou@co mi ng] The Ruby-GNOME2 project released Ruby-GNOME2 1.2.3.

Confusion with `nil` output from the method Symbol#<=>
405884 [lists@ru y- ] Symbol#<=> ->
+ 405885 [lists@ru y- ] both the functions return nil because
| 405886 [lists@ru y- ] I understand the above.
+ 405887 [lists@ru y- ] WHY DONT YOU GET IT?

Ruby-2.0.0-rc2 on Windows under Cygwin. Cannot run IRB, gem, rake, etc
405893 [lists@ru y- ] I've successfully (I think so) installed Ruby-2.0.0-rc2 on Windows XP
405912 [lists@ru y- ] So I figured out the problem. I was just my inadvertence.
405913 [matma.rex@gm] I use MinGW and it's pretty usable. (Never tried to compile Ruby on it, but I managed to compile ImageMagick when I needed it, so I suppose it would work.)

[ANN] Rote 0.4.0
405894 [lists@ru y- ] Just a quick note to let all interested parties know that Rote 0.4.0 has

[ANN] Scorched: Sinatra-inspired web application framework
405903 [lists@ru y- ] I'd like to announce a new project I've been working on that I've

forked child processes
405907 [lists@ru y- ] Is there a way to know how many child processes that have been forked by
+ 405908 [lists@ru y- ] As far as I know you'd have to set up a counter within the parent and
+ 405910 [shortcutter@] Yes, just record the PID in a Set or Array.
| 405921 [lists@ru y- ] Thanks for the detailed explanation with a great example.
+ 405925 [lists@ru y- ] I think it's the -w command line argument for Ruby, it means show
  405927 [shortcutter@] Exactly.

[ANN] rubygems-openpgp 0.6.0 released
405911 [kgo@gr nt ol] rubygems-openpgp 0.6.0 Released

xml parsing in blocks
405918 [lists@ru y- ] I was writing a small program as follows, But could not get expected
405920 [shortcutter@] Why don't you use Builder?

405928 [lists@ru y- ] If a process is forked on Linux, which version of ruby is implemented
+ 405929 [shortcutter@] It sounds as if you were mixing OS and Ruby features.  If the OS
| 405932 [robert.w.jac] On Mar 18, 2013, at 12:03 PM, Robert Klemme <shortcutter@googlemail.com> =
| 405933 [shortcutter@] Good point!  Maybe Ken was actually wondering about copy on write
+ 405940 [hmaddocks@me] 2.0

Re: Ruby-GNOME2 1.2.3
405930 [lists@ru y- ] Testing on Windows 7, Ruiby 2.0.0
405964 [kou@co mi ng] Thanks for trying it.
406011 [lists@ru y- ] That's work !
406026 [lists@ru y- ] Sorry, some  more  issues on windows ...
406051 [kou@co mi ng] No problem. Thanks for trying it. :-)
406060 [lists@ru y- ] gtk2                 1.2.3   => atk:>= 1.2.3 / pango:>= 1.2.3 /
406108 [kou@co mi ng] Yes. You need to use gtksourceview3 for gtk3. You cannot

Finding one's way with 'super' in define_method/alias_emthod
405931 [marcin.rzezn] This is my first post here, so please don't yell at me too harshly :-)
405935 [shortcutter@] Welcome to the wonderful world of Ruby!
405936 [lists@ru y- ] Thank you :-)
405942 [shortcutter@] Your expectation was clear.  But others may have different
405965 [lists@ru y- ] Sorry for late answer, busy day at work.
405968 [shortcutter@] No problem at all.  After all, you were the one looking for a solution. :-)
406045 [lists@ru y- ] Is there anything like compiled Ruby code? I'm curious. Could you
406047 [shortcutter@] AFAIK the Ruby code is parsed and compiled to some internal byte code
406052 [lists@ru y- ] So true, but I am hoping my explanation given below was sufficient.
+ 406053 [lists@ru y- ] written "if call is flagged as in_chain". My apologies.
+ 406055 [shortcutter@] Are you talking about "chain of responsibility"?
  406057 [shortcutter@] chain = [ ... ]

[SEC] [ANN] Rails 3.2.13, 3.1.12, and 2.3.18 have been released!
405934 [tenderlove@r] Rails versions 3.2.13, 3.1.12, and 2.3.18 have been released.  These releas=

[ANN] Serif version 0.4 released
405937 [adam@ap es o] I'm pleased to announce version 0.4 of Serif. The biggest change in

[ANN] nokogiri 1.5.7 Released
405938 [mike.dalessi] nokogiri version 1.5.7 has been released!

Multiple environments in a single process
405941 [lists@ru y- ] I'm using the Ruby C API to execute Ruby scripts, and I need each script
405977 [lists@ru y- ] I believe this can be done. We can enclose all the VM state variables
405978 [tony.arcieri] Might want to read this thread. It provides a bit of a post mortem on MVM.
406019 [lists@ru y- ] Thanks for the link. I see how the extensions would be a problem. How

[ANN] minitest 4.7.0 Released
405943 [ryand-ruby@z] minitest version 4.7.0 has been released!

[ANN] rake-remote_task 2.2.1 Released
405944 [ryand-ruby@z] rake-remote_task version 2.2.1 has been released!

[ANN] ruby_parser 3.1.2 Released
405945 [ryand-ruby@z] ruby_parser version 3.1.2 has been released!

[ANN] hoe 3.5.2 Released
405946 [ryand-ruby@z] hoe version 3.5.2 has been released!

Cisco Ruby pexpect equivalent
405947 [lists@ru y- ] This is my first post (long time lurker)
+ 405951 [shortcutter@] Does that something like Ruby's IO#expect?
| 405970 [cliff.rosson] Huh. I use something like this....
| 406065 [lists@ru y- ] Full Disclosure!  I'm one of the founders of Scriptrock..try it with our
| 406072 [cliff.rosson] Reading up on this now and sending to my Neteng team. The opening video
+ 406090 [lists@ru y- ] I use expect4r for some command line programs to login to cisco devices.

Error in method call - need help to understand
405948 [lists@ru y- ] $array = []
405949 [josh.cheek@g] In Ruby, you do not have to use parens around a method. So `method(arg)`
405971 [rubytalk2dav] In general, get in the habit of not leaving a space before the opening

Selenium webdriver CSS attribute reading
405952 [lists@ru y- ] <input type="submit" name="btnAddRequest" value="Add Bizz1"
+ 405953 [lists@ru y- ] I don't think selenium webdriver allows for selection on multiple
+ 405955 [lists@ru y- ] driver.find_elements(:name,"btnAddRequest").each{ |elem|
+ 406076 [lists@ru y- ] FYI, this is the watir-webdriver equivalent. Much simpler, shorter, and
+ 406140 [lists@ru y- ] Humm,

Algorithmic complexity
405954 [lists@ru y- ] v.attributes.map{ |k, val| {k => info.instance_values[k]}
+ 405957 [lists@ru y- ] At a glance, probably O(n)
| 405958 [lists@ru y- ] Er, actually, I think that's O(n).  Or something.  Argh, undergrad CS
+ 405962 [shortcutter@] Can you tell us what these variables reference?
+ 405982 [lists@ru y- ] I do not know what is v ...
| 406003 [shortcutter@] v.attributes.each {|k,| v.send "#{k}=", info.instance_values[k]}
+ 406064 [lists@ru y- ] Yes, Thx!

Creating desktop application in visual ruby
405956 [lists@ru y- ] I am creating an application using visualruby. I want to make it as .exe
+ 405959 [lists@ru y- ] There are many options. Personally I use a combination of TCL/Tk and the
+ 405966 [lists@ru y- ] Thanks alot Joel for replying. Could you please suggest me any tutorials
+ 405967 [lists@ru y- ] Well, you'll want to try out a few different tools and work out the best
+ 405969 [lists@ru y- ] Thank you joel, thanks for spending your time. It will be very useful

undefined method `Gauge' for SNMPSET:Class (NoMethodError)
405960 [lists@ru y- ] Does anybody have an idea how to SET a snmp gauge OID? My code sample is

[ANN] Celluloid 0.13.0: concurrent objects for Ruby
405972 [tony.arcieri] Celluloid 0.13 is out!

[ANN] Celluloid::ZMQ 0.13.0: evented ZeroMQ sockets for Celluloid
405973 [tony.arcieri] * Feature: Support for DealerSocket and RouterSocket

[ANN] Celluloid::IO 0.13.0: evented sockets for Celluloid
405974 [tony.arcieri] * SSL is now fully supported

[ANN] DCell 0.13.0: actor-based distributed objects for Ruby
405975 [tony.arcieri] DCell 0.13.0 is out!
405979 [joelvanderwe] Great timing, Tony! I had already scheduled today to start digging into
406035 [tamouse.list] Let's hear it for ginger orphans! YAY

[ANN] Celluloid::DNS 0.0.1: DNS server framework for Celluloid::IO
405976 [tony.arcieri] This is useful if you want to, say, serve the locations of nodes in a

library sdl (cannot load such file)
405980 [lists@ru y- ] /.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
+ 405981 [echristopher] Have you tried running gem without sudo?
+ 405988 [fluido@fl id] I do not use rvm, and I try to stay as clear as possible from
  405992 [carlos.agari] Hey, can you post more information? Do you have any file that is requiring
  405994 [fluido@fl id] I have written lots of code that requires sdl, but I compile both Ruby
  405999 [lists@ru y- ] Hey Carlos,
  406001 [fluido@fl id] sudo find / -name sdl.rb

[ANN] nokogiri 1.5.8 Released
405983 [mike.dalessi] nokogiri version 1.5.8 has been released!

RSS standard lib?
405984 [rubyhacker@g] I used to use "feedtools" (now defunct) and I am trying to switch over
405985 [kou@co mi ng] require 'rss'

Ruby tainting on primitives
405986 [lists@ru y- ] I am trying to use tainting on Ruby primitives, but it seems to be
+ 405990 [lists@ru y- ] that was fixed in 2.0 or 2.1dev at there Fixnums and Bignums are now
+ 405997 [lists@ru y- ] Maybe I was not clear.
| 406004 [shortcutter@] What would be the point in tainting numbers?  Numbers are immutable
+ 406000 [lists@ru y- ] it does not work because this primitives are instances of Classes, but
+ 406027 [lists@ru y- ] I'd like to use tainting to keep track of some data moving around.
| 406028 [shortcutter@] But they are singletons.  That is a fact.
+ 406033 [lists@ru y- ] I understand now that we cannot taint Fixnums in the current Ruby
| + 406034 [ryand-ruby@z] not,=20
| + 406041 [shortcutter@] It may be an implementation detail in other contexts but when it comes
+ 406042 [lists@ru y- ] We would preserve all the semantics. Let me explain.
| 406068 [ryand-ruby@z] Which gets you ... what?
+ 406043 [lists@ru y- ] did you image how to "upgrade the Fixnum into a Bignum."?
| 406044 [lists@ru y- ] Fair enough, I was wrong.
+ 406069 [lists@ru y- ] That is actually where I'm coming from. Some JSON is coming from an
| 406070 [ryand-ruby@z] which is not what tainting is for.
| 406071 [lists@ru y- ] Oh wow.
+ 406075 [lists@ru y- ] Wouldn't it be simpler to create a custom class with an attribute that

Why was the object_id for true and nil changed in ruby2.0?
405987 [lists@ru y- ] irb(main):001:0> true.object_id
+ 405989 [lists@ru y- ] ...
| 406012 [lists@ru y- ] I have tried to read it, but the presentations given in that link are written in Japanese, and I couldn't understand what Flonums are why they are implemented.
| 406016 [me@da id wd ] ...
| 406017 [adam@ap es o] I'm interested (as is Hans, I think) in understanding the specifics of
+ 406014 [lists@ru y- ] hm the forumtopic i linked was in english ...
| 406021 [lists@ru y- ] This shows true in my system too, but my ruby -v is ruby 2.0.0p0
| 406023 [matma.rex@gm] This only should be true on 64bit Ruby 2.0.
| 406024 [lists@ru y- ] Yes.
+ 406025 [lists@ru y- ] Well, there is a new answer on Stack Overflow.
  406029 [matthew@ke w] Because immediate values have no overhead. It takes memory and cpu cycles

Confusion with has object creation.
405991 [lists@ru y- ] I know we create Hash object with Hash.new,it calls `initialize` method.
+ 405993 [lists@ru y- ] Hash[] only call methods that you can not overwrite... it allocates the
| + 405995 [halogenandto] This is the method
| + 405996 [lists@ru y- ] Please give me one code example of this.I am heavily interested on it. I
+ 405998 [lists@ru y- ] last time you used C functions to show me that i am Wrong and now you
  406002 [lists@ru y- ] No friend! I didn't challenge you, i will never do that even if I got

Can't run sudo under ssh.exec!
406007 [lists@ru y- ] The problem is, when I'm trying to run ssh.exec!("sudo
+ 406008 [shortcutter@] You can configure sudo in a way as to permit some commands without
+ 406009 [lists@ru y- ] Thank you for your reply, it is suitable to do not change any thing in
| + 406020 [shortcutter@] Why?  Obviously you placed /home/cder/ComponentTester/JKL there so you
| + 406126 [lists@ru y- ] Maybe you can elaborate on what it is you're willing/able to change and
| | 406127 [me@da id wd ] Only problem with that is that then the password would be in the shell
| | 406128 [lists@ru y- ] You're absolutely right, which is why I don't recommend either solution
| + 406129 [garthy_lmklt] The most straightforward solution is to explore the sudo/sudoers route
+ 408246 [lists@ru y- ] channel.exec(" sudo ls -l") do |ch, success|