399927-400476 subjects 400347-400755

Some warnings Watir webdriver/selenium/fork
400138 [lists@ru y- ] How to solve these warnings? Kindly help me a way to find solution.
+ 400191 [lists@ru y- ] why the warning? and how can I solve it?
+ 400192 [lists@ru y- ] Because you haven't assigned a value to @cwd, or its lost its value in
| 400219 [lists@ru y- ] I have just invoked the code using a ruby script using system.
+ 400224 [lists@ru y- ] From the look of it, webdriver is overwriting its own methods every time
  400357 [lists@ru y- ] I get these warning most probably because I run the script from another
  400361 [lists@ru y- ] Suppress stdout until the errors have passed, then restore it.
  400376 [lists@ru y- ] Did not get you, kindly put some more light on it
  400383 [lists@ru y- ] Actually I just tried that, and webdriver seems to be ignoring the
  400387 [lists@ru y- ] So basically we are taking warnings and redirecting it to some file

Undefined method `-' for nil
400139 [lists@ru y- ] So I've hit a brick wall with a simple piece of code and hope someone
+ 400140 [sduncan@we a] Really need to see what the developer objects and bank objects look
| 400141 [lists@ru y- ] class Developer
| 400145 [sduncan@we a] Well for a start, Bank#moves_loans method takes an 'amount' argument
| 400146 [lists@ru y- ] My bad, I just copied the code wrong .... assuming I have all that fixed
| + 400147 [sduncan@we a] It is very confusing what the code actually looks like. Do you think you
| | 400148 [lists@ru y- ] Sorry, I really messed up copying the code :p
| + 400156 [jgabrielygal] Here amount_of_loans is understoos as a local variable, since you have
+ 400142 [lists@ru y- ] Go into the function: bank.moves_loans
+ 400144 [lists@ru y- ] Don't mind the extra fields in the Bank object creation, they're not

Is watir web driver thread safe?
400143 [lists@ru y- ] My subject is the question.
+ 400153 [jam@ja an be] What research have you done towards finding an answer? I don't want to dupli=
+ 400186 [lists@ru y- ] I have got that selenium is not thread safe.. but what about
| 400197 [lists@ru y- ] Where is the path of @browser=Watir::Browser.new in ubuntu?
+ 400346 [lists@ru y- ] So you'll just need the appropriate directory tree in relation to your

Why doesn't ruby support native threading?
400149 [lists@ru y- ] I think supporting native threading is a great thing in terms of
+ 400150 [sduncan@we a] Ruby does support native threading.
+ 400151 [hmaddocks@me] ...
+ 400152 [tony.arcieri] JRuby and Rubinius both support thread-level parallelism at the CPU level
  400154 [jam@ja an be] ...

[ANN] Ruby mogilefs-client 3.4.0 released
400155 [normalperson] A MogileFS client library for Ruby.  MogileFS is an open source

DRb-loopback ip works but Lan ip doesnt.
400157 [lists@ru y- ] I have run the server program on my local pc.
400158 [jam@ja an be] Local host connection. Typically not fire walled, always works irrespective o=

the name of the method where was created
400160 [lists@ru y- ] I want to know in ba the name of the method, is that possible?
400161 [jgabrielygal] ba(xx)

reading and using urls from txtfile
400162 [lists@ru y- ] I want to read a bunch of urls, listed on each seperate line in a txt
+ 400163 [jgabrielygal] File.foreach("file.txt") do |line|
+ 400165 [lists@ru y- ] Jesus, thanks a million.

[ANN] JRuby 1.7.0.RC2 Released
400166 [tom.enebo@gm] The JRuby community is pleased to announce the release of JRuby 1.7.0.RC2.
400211 [lists@ru y- ] LOL. We need a drop shadow on that J! Yes!

SocketError when letting ruby open url from txt-file
400167 [lists@ru y- ] I have constructed a code that opens all urls in a textfile one by one,
+ 400168 [jgabrielygal] 1.9.2p290 :001 > require 'open-uri'
+ 400170 [lists@ru y- ] It's half a million files.. So I don't know if printing the file first
| 400173 [jgabrielygal] Yes, I meant that there's probably some bad (invalid) uris. Or maybe
+ 400189 [lists@ru y- ] It works, perfect!

Simulation of a dictionary
400171 [lists@ru y- ] What I'm trying to do, is a program that has a hash with predefined
+ 400172 [echristopher] Maybe use something like Levenshtein distance.
| 400199 [jgabrielygal] require 'text'
| 400200 [jgabrielygal] -in-ruby
+ 400198 [lists@ru y- ] means "get string", so everything inputted for the user will be a

Convert String to Currency
400176 [lists@ru y- ] I have a String and i need to convert it into Currency format and
+ 400179 [lists@ru y- ] str = "$6,178.50 USD / 22,693.01 AED"
+ 400182 [shortcutter@] irb(main):001:0> s = "$6,178.50 USD / 22,693.01 AED"
| 400185 [kiswono@gm i] s="$6,178.50 USD / 22,693.01 AED"
+ 400194 [caduceass@gm] s = "$6,178.50 USD / 22,693.01 AED"
  400195 [caduceass@gm] Sorry, supposed to be "USD", not "US"

[ANN] md2man 1.3.1
400181 [sunaku@gm il] md2man - markdown to manpage

Threads not concurrent
400183 [lists@ru y- ] ================few lines of codes
+ 400223 [jam@ja an be] Odd as it sounds, try printing to stderr and not stdout. Stdout is buffered a=
+ 400272 [lists@ru y- ] process=Process.new(obj)

Working with excel files using Ruby
400184 [skyaltitude@] I am new to Ruby. I am working on a code wherein I need to read data from
+ 400188 [ivan.bisevac] I tried roo and spreadsheet. First one works perfect with Google
+ 400190 [lists@ru y- ] If I want to quickly read an "xls" file I'll use spreadsheet. If I want

common variable for all threads
400193 [lists@ru y- ] What variable (shared or global variable) should I use to make it use by

How get list of all installed modules/gems in ruby
400196 [lists@ru y- ] How to get list of all installed modules/gems in ruby otherthan "gem
+ 400203 [matma.rex@gm] I assume you want the in Ruby code?
+ 400238 [lists@ru y- ] Thanks.
| 400239 [sduncan@we a] Try running it like this;
| 400240 [matma.rex@gm] In 1.8 you need to `require 'rubygems'` first, I think.
+ 400241 [lists@ru y- ] Thanks Sam. It works.
| 400242 [matthew@ke w] I've always got by with `gem list` or `gem1.9.1 list` or whatever is
+ 400243 [lists@ru y- ] Thanks Matma and matthew.

Seconds to hr:min:sec
400201 [lists@ru y- ] How can I convert seconds to the format in subject.
+ 400202 [ymendel@po o] If there's something built-in, I shouldn't have bothered with
+ 400205 [caduceass@gm] def ptime sec
  400247 [ruby-talk@la] def ptime sec

Number of GC calls
400204 [lists@ru y- ] I read on an article, that when Ruby allocates in C-heap, there are more
400210 [lists@ru y- ] MRI does a GC *before* allocating, to see if it doesn't have to.  If

[ANN] linguistics 2.0.0 Released
400206 [ged@Fa ri MU] ...
+ 400246 [botpena@gm i] omg. thank you, Michael.
+ 400253 [javi@la an e] ...

How to create an Array in a Hash
400207 [lists@ru y- ] I am new to Ruby and am working on Anagram. So in anagram for the input
+ 400208 [lists@ru y- ] maybe like this?
| 400209 [lists@ru y- ] Thank you Hans for such a quick reply. Two things, where should this
+ 400215 [lists@ru y- ] 1)
| 400217 [lists@ru y- ] Thanks, i removed uniq and did what you said and got exactly what i was
+ 400216 [lists@ru y- ] Ok, I did what you proposed

&& should work in a system call?
400212 [rogerdpack2@] system("ffmpeg -i || ls")
+ 400213 [rogerdpack2@] I see now that it works in Linux, but not windows.  I'm guessing this
| 400218 [matma.rex@gm] There is not `ls` command on Windows (unless you install cygwin /
| 400220 [rogerdpack2@] $ whichr ls
| + 400225 [matma.rex@gm] Hm, interesting; I didn't run the code before, but I tried now and
| + 400276 [graham@me he] This is purely an educated guess... it possibly matters whether you have
|   400282 [rogerdpack2@] Yes, I was surprised to learn that, at least with windows OS's I've
|   400286 [lists@ru y- ] Indeed, cmd.exe sometimes surprises us in a good way
+ 400258 [lists@ru y- ] filed http://bugs.ruby-lang.org/issues/7143

Re: linguistics 2.0.0 Released
400214 [lists@ru y- ] 3 cheers for a number library that actually works, thanks!
400251 [lists@ru y- ] Thank you, very usefull.

[ANN] google_hash v 0.7.0 released. Faster hashes for MRI.
400226 [rogerdpack2@] Pleased to announce v 0.7.0 of the google_hash gem has been released,
400230 [ryand-ruby@z] IntToInt, it stores only 4 bytes per int, instead of Ruby's usual 20 =
400255 [rogerdpack2@] Normal size (or at least used to be) of a "ruby object" in 32 bit MRI.
400269 [normalperson] I thought this was referring to st_table_entry size in st.c, but that's
400270 [ryand-ruby@z] IntToInt, it stores only 4 bytes per int, instead of Ruby's usual 20 =
400271 [rogerdpack2@] I presumed they were encapsulated within an RObject, so would take up

[ANN] celluloid 0.12.1: concurrent objects for Ruby (now with better debugging!)
400227 [tony.arcieri] Celluloid 0.12.1 is out. It's primarily a bugfix release for 0.12.1, but
400229 [tony.arcieri] It seems the new incident reporter wasn't ready for primetime. I've
400244 [tony.arcieri] That's not necessarily a good thing if your cores are hyperthreaded.

ghost methods and dynamic methods
400233 [lists@ru y- ] I am a newbie to ruby please explain your answers thoroughly. I am
+ 400234 [lists@ru y- ] That's not how you should use method_missing. Note that this method is
+ 400235 [lists@ru y- ] class Car
+ 400236 [lists@ru y- ] class <<self
+ 400237 [lists@ru y- ] Would this also work?
| + 400245 [lists@ru y- ] Haven't you read anything of my long posting? :-(
| | 400248 [matthew@ke w] I believe you mean redcars_assign_MyClass_select_cars_where_color_is_red
| + 400254 [lists@ru y- ] top_speed = 250
+ 400256 [shortcutter@] Why do you want to do that?  The proper way to code that selection would be

[ANN] unicorn 4.4.0 - Rack HTTP server for fast clients and Unix
400249 [normalperson] Unicorn is an HTTP server for Rack applications designed to only serve

telnet by socket
400250 [lists@ru y- ] i am trying to telnet by ruby.. i went through google. but i am bit
+ 400257 [sto.mar@we .] typo
+ 400268 [lists@ru y- ] Then you should have found Net::Telnet which is part of the ruby
+ 400303 [lists@ru y- ] i found the solution i had to put
| 400305 [caduceass@gm] It sounds like it's receiving and responding to \r and then \n. Just
+ 400307 [lists@ru y- ] OK Server

Convert elements of array into a single integer
400260 [lists@ru y- ] I've tried searching for this on the forum and couldn't find an answer.
+ 400261 [shortcutter@] Better
+ 400262 [matma.rex@gm] x = y.join('').to_i
+ 400264 [lists@ru y- ] Thank you both!

Explanation of # and @#.
400265 [lists@ru y- ] I am relatively new to Ruby. In the below code which redefines the
+ 400266 [sophrinix@gm] Those are string interpolation.
+ 400267 [hmaddocks@me] %Q{
+ 400296 [lists@ru y- ] greeting = 'hello'
+ 400298 [lists@ru y- ] verb = 'yelled'

Modifying cell value in csv without FasterCsv
400273 [lists@ru y- ] Guys,
400290 [lists@ru y- ] Read each row of your csv file, and write out each row--incorporating
400292 [troy.surrett] 1.8.7 :005 > require 'csv'

Ruby 1.8.7 patchlevel 371 (CVE-2012-4466)
400274 [shyouhei@ru ] CVE-2012-4466 was reported against 1.8.7.  This is about $SAFE escaping, so

Ruby/Rake Warnings and errors
400277 [lists@ru y- ] I am new to ruby,so please let me know how to learn quickly in a better
+ 400278 [lists@ru y- ] How to find gems based on methods
+ 400279 [lists@ru y- ] I don't get what you want. You're talking about four different things at
  400280 [lists@ru y- ] Sorry for the trouble,

[ANN] Ruby 1.9.3 patchlevel 286
400281 [usa@ga ba ec] Ruby 1.9.3-p286 is released.

Start ruby program at startup
400283 [lists@ru y- ] How to do it on windows XP - I think using autoexec.bat, but what is the
400285 [lists@ru y- ] Posted via http://www.ruby-forum.com/.

RubyInstaller releases delayed
400284 [jon.forums@g] Our goal is to release signed Windows installers, 7z archives, and documentation for the RubyInstaller within 24 hours of official ruby-core releases.

Downloadable, Real-World, Working Example Applications
400287 [lists@ru y- ] I've been using Ruby and Rails and other ancillary technologies for a
400294 [troy.surrett] I know there are definitely example applications on Github.  Maybe you

How to create a MiniTest::Mock object that expects to_s
400288 [sto.mar@we .] how can I create a mock object with MiniTest that expects a
400318 [sto.mar@we .] 1.9.3-p194 :001 > require 'minitest/mock'
400441 [sto.mar@we .] Am still interested in how to do this properly. Thanks.

[ANN] redis_failover 1.0 released
400289 [lists@ru y- ] I just released the big 1.0 release of redis_failover. redis_failover is

I want help installing Ruby on a windows 7
400291 [lists@ru y- ] I don't have any programming experience and wanted to give it a shot
400293 [matma.rex@gm] You don't need fxri, it's an ancient tool for browsing Ruby's documentation.

[ANN] Automated Testing on Mac (ATOMac) 1.0.0 released
400295 [nagappan@gm ] With this announcement LDTP is now cross platform GUI testing ! I'm excited
400297 [ryand-ruby@z] This sure seems like the wrong list to announce to... twice over.
400299 [nagappan@gm ] LDTP have Ruby interface and hence announced to this list :-)

multiple array problem
400302 [rwobben@ho m] ...
+ 400306 [lists@ru y- ] first select the right category and iterate over the articles
| 400309 [rwobben@ho m] ...
| 400313 [lists@ru y- ] category1, category2 and category3.
+ 400310 [rubytalk2dav] Sure.  Make an array out of your 3 arrays: [category1, category2,
| 400311 [rwobben@ho m] ...
+ 400312 [shortcutter@] The usual solution for repeated code is to put it into a function or

curl output from ruby script
400304 [lists@ru y- ] Normally when i do curl i get this
+ 400308 [lists@ru y- ] It isn't. curl is, because you are not running curl at a terminal (or
+ 400314 [shortcutter@] Use Net::HTTP or Mechanize instead of an external program like curl

[ANN] md2man 1.3.2
400315 [sunaku@gm il] md2man - markdown to manpage

[ANN] binman 3.1.1
400316 [sunaku@gm il] binman - man pages for bin scripts

is an unsafe binding context that does not close over anything, actually safe
400317 [lists@ru y- ] def context_binding
400320 [shortcutter@] What exactly do you mean by "safe" here?  Can you be more specific

Posix locales in ruby ?
400319 [lists@ru y- ] any idea how localise ruby applications by locales settings on posix

Re: is an untrusted binding that does not close over anything, in practice trusted
400321 [lists@ru y- ] I meant to use the term (un)trusted. The concept of trust is well
400434 [lists@ru y- ] def context_binding
400439 [matma.rex@gm] I don't think there is. Unfortunately, just about no one uses this
400442 [lists@ru y- ] def context_binding
400443 [matma.rex@gm] I'm referring to $SAFE.

best way to extract data from a string?
400322 [lists@ru y- ] I have a string
+ 400323 [ivan.bisevac] 2012/10/14 Erez Ben shoham <lists@ruby-forum.com>
| 400329 [imran.nazir@] ...
+ 400325 [lists@ru y- ] the best way would be to use a proper data format. But I assume the
| 400326 [lists@ru y- ] sorry for my English
+ 400335 [lists@ru y- ] str = 'file name_Width34.56_Height45.97_.jpg'
  400343 [lists@ru y- ] Very true. Anything (even a crappy CSV) would have been better than

[ANN] md2man 1.4.0
400324 [sunaku@gm il] md2man - markdown to manpage

[ANN] binman 3.2.0
400327 [sunaku@gm il] binman - man pages for bin scripts

how to join the return of array
400328 [lists@ru y- ] I know joining arrays and strings but this issue is very specific to an
400330 [hmaddocks@me] out = Hash.new do {|h,v| h[v] = []}
400331 [lists@ru y- ] Thanks a bunch !
400332 [hmaddocks@me] Because the default value of an uninitialised hash key is nil and nil doesn't respond to <<
400333 [lists@ru y- ] Superb ! thnx ! I was mising on such a small concept :(

[ANN] rouge
400334 [   ar@le .m ] I'd like to announce Rouge, which is an implementation of Clojure on Ruby.
400424 [   ar@le .m ] As a follow-up to this, there's now a Google Group mailing list: https://groups.google.com/forum/#!forum/rouge-talk
+ 400474 [code@ap th o] I've joined, though I'm really really bad at keeping up with things on
+ 400604 [   ar@le .m ] As a hopefully final (!?) follow-up to this post, you can now play with Rouge online in a Try Ruby-like environment: http://try.rouge.io (with much inspiration gleaned from _why's original :-))

RUBY/shoes GUI list_box from sql
400336 [lists@ru y- ] How do I insert a list from the database in a listbox
+ 400359 [ashbbb@gm il] Although I don't know the structure/format of your database.
+ 400422 [lists@ru y- ] Thanks man, its worked

How to find where a method is defined
400337 [takanobu_mae] Now I am learning Ruby on Rails and have a problem.
+ 400341 [ryand-ruby@z] On Oct 14, 2012, at 22:13 , =1B$BA0@n!!5}?N=1B(B =
+ 400358 [shortcutter@] That's not a good idea IMHO since the data is redundant and you need

About define_method
400338 [lists@ru y- ] I want to define a method in kernel using Flattern Scope.
+ 400339 [shortcutter@] You simply cannot define methods which use block passed to them via
| + 400340 [lists@ru y- ] module Kernel
| + 400342 [ryand-ruby@z] you meant :foo
|   400344 [shortcutter@] Yes, of course.  Thanks for catching that.  Then we get
|   400345 [lists@ru y- ] can you give me more details? Or it is a rule that I can not use yield
|   400349 [shortcutter@] irb(main):013:0> String.send(:define_method, :foo) {|a, &b| b.call(a +
+ 400453 [lists@ru y- ] . . .
+ 400457 [lists@ru y- ] I looked at all the posts above again, and realized that both, you li,
+ 400458 [lists@ru y- ] I looked at all the posts again, and realized that both, you li, and