368119-369851 subjects 368508-369033

Using fetch_fields in MySQL for Windows
368332 [yuvalrooz@gm] Hey,
368368 [rogerpack200] probably a bug in the gem.
368374 [yuvalrooz@gm] I found a solution for the problem.  The MySQL gem does not work with

Convert array of object to xml
368335 [shyamkkhadka] I have an array containing objects of different classes.Each class is
368370 [robert.dober] Hmm I have to do some guessing here
368388 [shyamkkhadka] Thanks for your reply.
368414 [robert.dober] I used rc for my convenience, but why not use ActiveSupport without rails?
368417 [shyamkkhadka] I agree with you. But for my case, I am writing pure ruby gem that has

Nokogiri SAX parser encoding problem
368340 [michel@de az] According to Nokogiri's doc, it works internally in UTF-8.
368342 [ryand-ruby@z] What does a plain put with this string give you?
368352 [michel@de az] Yes, Ryan, you are right : writing to a utf-8 file gives the good
368358 [michel@de az] Alas, no !
368363 [michel@de az] Sorry for posting again. Actually, in this last example, 'characters' is
+ 368376 [ryand-ruby@z] the=20
+ 368383 [hutch-lists@] Actually this is allowed by the XML spec, annoying as it is. Many parsers do this when encountering an entity (e.g. ') in the input stream (you get three strings, before, entity character, after). Some XML parsers have a parameter that tells it to join adjacent strings together before reporting a single string. I don't know if Nokogiri provides this functionality, but it might be worth a quick peek.
  368395 [michel@de az] @Bob : Yes, it is allowed.

gem list --remote does not work on windows running ruby 1.9.2p0
368343 [botpena@gm i] Title says all.
+ 368348 [luislavena@g] When reporting issues related to RubyGems, please provide the
| 368389 [botpena@gm i] ebug -V" options.
+ 368349 [luislavena@g] It is worth mentioning that your username contains accented
  368390 [botpena@gm i] ah, yes.
  368391 [luislavena@g] Did you installed ruby with admin rights? Because gem env shows the
  368392 [botpena@gm i] out of desperation, i removed all home vars (eg homepath...) _and_ it
  368404 [luislavena@g] ht information.
  368416 [botpena@gm i] well if the going gets tough, the brain fa*rts :)

Newbie question on file reading
368345 [raj_plays@ya] I have got the code to read a file line by line amd it works too but I
+ 368346 [peterhickman] I believe it comes from the IO class instead
| 368351 [shortcutter@] Yes, this is true.
| 368362 [raj_plays@ya] Thank you, Robert.
| 368364 [shortcutter@] Your welcome!
| 368378 [raj_plays@ya] Thank you, Martin and Robert
| 368420 [raj_plays@ya] In continuation with my questions about reading files from the file
| 368421 [shortcutter@] You can feed the result through #map and File.basename.
+ 368359 [martindemell] How big is your file? IO.read("/path/to/file") will read the entire

See Hot Sexy Star *Angelina Jolie* Nude Bathing Videos In All Angles
368353 [magguru.chin] See Hot Sexy Star *Angelina Jolie* Nude Bathing Videos In All Angles

If input contains....
368355 [human.dictio] I'm making a secure password generator, where the user inputs a word and
+ 368356 [martindemell] Check out String#gsub
+ 368357 [shortcutter@] input.gsub! /S/, '$'
+ 368360 [peterhickman] That is not going to be very secure.
| 368595 [code@ap th o] I may be a little late to this thread, but . . . what the heck.
+ 368361 [Rob@Ag le on] String#tr and String#gsub come to mind.
+ 368369 [jeanjulien.f] string = "password"
  + 368371 [peterhickman] The really insane ones are used to access accounts or services
  + 368596 [code@ap th o] Speaking only as someone not named Peter, I use a password manager.  At

#attr back to 1.8.6 an older behavior?
368365 [transfire@gm] What happened to dropping the optional true/false parameter from #attr
368436 [b.candler@po] FWIW, it looks like 1.9.1 doesn't allow attr :x= anyway (reader
368450 [transfire@gm] I don't really care about the 'x=3D' option either way, though I do

Lock file while copying
368372 [aidy.lewis@g] Is it possible during File.copy to lock that file from any other
368432 [b.candler@po] Not normally - unless your operating system supports Mandatory File

warning: method redefined
368377 [iainspeed@gm] Any idea how to track down `warning: method redefined` errors? Is there =
368379 [iainspeed@gm] there a way to force errors to appear with irb when I load individual =
368431 [b.candler@po] It can happen if you require them in different ways, e.g.
368437 [iainspeed@gm] is=20

[ANN] ffi-ncurses 0.3.3
368384 [sean.ohalpin] I've just released version 0.3.3 of the ffi-ncurses gem. This fixes
368387 [botpena@gm i] uver cool. thanks sean.

HTTPClient Suddenly Fails - Cannot Verify Certificate File
368385 [bodarotech@g] Today (Tues. Aug 24 2010) using HTTPClient for a SSL connection fails.
368386 [richard.conr] Dumb question (you did ask for *any* advice)
368393 [bodarotech@g] call HTTPClient.new and connecting. Offhand I cannot remember the url (I
368394 [bodarotech@g] Heres is a test I ran from the rails console to verify that the issue is

Character encoding problem
368397 [dave@de el p] I am getting an encoding problem when trying to write an xml file out
368399 [cppcodeguy@a] I git cloned the file and looked through to see if i could find the
368400 [dave@de el p] That works great, thank you for all your effort in looking into this,

check if Win32OLE still available
368398 [ rv@do os be] ...
368407 [rogerpack200] call some method on it, perhaps?
368408 [ rv@do os be] Hey,
368411 [cbciv@ya oo ] When you call a method after the application has been closed, does it
370068 [ rv@do os be] I'm getting back on this.
370069 [masaki.suket] What is the error you received?
370074 [ rv@do os be] HRESULT error code:0x800706ba
370093 [masaki.suket] No. You must use begin rescue end to catch WIN32OLERuntimeError exception.
370107 [ rv@do os be] Excellent! Thank you.

Configuration management tool
368402 [sardaukar.si] I wanted to use Puppy to maintain configuration for some Windows servers,
368412 [cbciv@ya oo ] [snip configuration management util for Windows hosts]

Simulating a TTY?
368405 [sutniuq@gm .] I'm trying to write something like a terminal emulator for use inside a
+ 368406 [rogerpack200] live console [1] monkey patches irb to allow it to receive from a socket
| 368446 [sutniuq@gm .] Thanks, fxri pointed me to the right direction. I already solved problem
| 368561 [ed.howland@g] I'd look at guirb [1] as well. Even though it is written in Tk (and
| 368569 [sutniuq@gm .] guirb looks good. I will definetely look at it.
+ 368575 [james@gr ys ] the

Time.local and offsets
368409 [fxn@ha hr f.] Does anyone know why Time.local gives these offsets here? (+0100 is correct)
+ 368429 [b.candler@po] IIRC, daylight saving time was first introduced as a wartime
| 368430 [b.candler@po] Sorry, I should engage brain before typing. Jan 1st is not in the
| + 368434 [fxn@ha hr f.] It's a bit weird (though I guess there's an explanation).
| | 368440 [b.candler@po] => true
| | 368491 [b.candler@po] It wasn't until 1847 that Greenwich Mean Time was widely used across the
| | 368492 [fxn@ha hr f.] Awesome!!!
| + 368749 [rick.denatal] Also, although daylight saving time WAS initiated as a war time
+ 368438 [akr@fs j. rg] % TZ=Europe/Madrid ruby -ve 'p Time.local(2010); p Time.local(1940); p

Some odd ball optimization tricks....
368415 [john.carter@] Here are two idioms which you may find useful, or at least curious, when
+ 368418 [ninja@sl ph ] I guess I can think of a few rare instances this might be useful, but I've
+ 368422 [shortcutter@] I prefer

Re: ffi-ncurses 0.3.3
368423 [sentinel1879] thanks sean
368500 [sean.ohalpin] Sure - it's documented in the README at
368533 [botpena@gm i] it would be great if ffi curses portability gets integrated w rbcurses
368538 [sentinel1879] Not clear what this implies. rbcurse does *not* use ncurses form or
368546 [botpena@gm i] i was wrong then. i thought* rbcurse required ruby-ncurses... wc i
368556 [sean.ohalpin] It does. (I think the 1.9.x difficulties with Ruby's ncurses have been
+ 368578 [botpena@gm i] very nics.
+ 368623 [sentinel1879] botp et al
  + 368625 [botpena@gm i] barrier of the ruby-ncurses that is keeping a lot of us fr using it
  | 368627 [sentinel1879] What platform are you on ? While we work on moving rbcurse to ffi, can
  | 368632 [sentinel1879] Wanted to confirm. Seems ffi-ncurses does not support panels. Panels are
  | 368647 [sean.ohalpin] 0.3.4: tidy up wide character support (almost ready to ship)
  | + 368663 [sentinel1879] I noticed in ncurses-example.rb that you've created a module and WINDOW
  | | 368678 [sean.ohalpin] Yes, it will but it's not exactly quite there yet.
  | + 368670 [m.fellinger@] Michael Fellinger
  |   + 368680 [sean.ohalpin] Wow. That looks great. Would you mind if I included it in my 0.4.1
  |   | 368689 [m.fellinger@] It's MIT licensed, so no problem.
  |   + 368695 [botpena@gm i] cool h@cker.
  + 368650 [sean.ohalpin] I have the same issue. I've been thinking about how to automate visual
    368675 [renard@nc rr] Believe it or not, I do not any GUI application.

368424 [jeeva235@ho ] HOW TO MAKE $2000 IN YOUR WEEKEND NO INVESTMENT

368425 [iainspeed@gm] Being English and able to spell proper like, innit, I find I'm creating =
+ 368428 [chastell@ch ] It definitely does work =E2=80=93 you can start using #initialise instead of
| 368435 [iainspeed@gm] arise..
| 368441 [b.candler@po] class Object
| + 368453 [iainspeed@gm] Thanks, I'll give that a shot.
| + 368485 [shortcutter@] What about inheritance especially in light of "super"?  I'm with
+ 368433 [joseph.savar] I see your point.

[ANN] rcairo 1.8.3
368426 [kou@co mi ng] (*1) A library to use cairo(*2) from Ruby.
368444 [dsisnero@gm ] I installed this in windows
368465 [kou@co mi ng] Thanks for trying it.

Ruby and selenium for a newbie
368427 [snomys@ho ma] I am looking at automation using selenium with the ruby api, and am

Re: Contribution wanted: test your code with 1.9.2-preview3
368442 [rogerpack200] Appears this has been the case for 1.9.1 with p378+

gem install RedCloth
368443 [advancedtech] I am just learning Ruby and have become somewhat frustrated on this
+ 368445 [sutniuq@gm .] You need a C compiler to install gems with native extensions. The
| 368447 [advancedtech] Where or how do I get this C compiler. The book mentions nothing about
| + 368448 [sutniuq@gm .] At first, you need to know that RubyGems can be written in other
| + 368449 [rogerpack200] Book is out of date.
|   368451 [advancedtech] Thank You! This worked
+ 368458 [luislavena@g] You need a compiler.

getting fox unit test runner to work
368452 [alexisdal@ho] sorry if the question seems dump but...
368472 [ryand-ruby@z] Look at that number. Embrace it. Love it. But, please, don't ruin it by =
368479 [alexisdal@ho] i couldn't agree more
368489 [ryand-ruby@z] by=20

Node hierarchies, and the inspection thereof
368454 [sinisterchip] Sorry if this belongs in Ruby Core, though I don't really think it does
368457 [rogerdpack2@] Currently there's no way to get the nodes of methods with 1.9.{1,2}
368494 [sinisterchip] That's what I suspected, but was hoping I'd just missed something. :(

Idiom or method for determining where in the class hierarchy an object fits
368455 [ccw.in.nc@gm] I have a class hierachy that looks like this
368456 [mike@st k. a] You could try kind_of? e.g.
368459 [ccw.in.nc@gm] Thank you!  I was only aware of instance_of?  This is exactly what I

syscall: string contains null byte
368460 [hadmut@da is] is there any chance to ever have bug #20895 fixed?

May I know that why the zz[0]=="s" return false, please?
368461 [jayaoscarlok] Dear Sir,
+ 368462 [Gennady.Byst] "s" is a string containing one actual character (s). While you have 3 after=
+ 368463 [astahl@hi .c] Because it is.
+ 368464 [josh.cheek@g] You output an inspected view of your objects with the method p, that should

Get Proc of current block?
368467 [transfire@gm] Is there any way to get a hold of the current block? I've been playing
+ 368469 [m.fellinger@] That's called the Y-combinator, something i wish could be added to
| 370552 [transfire@gm] Helpful. Thanks. I am considering adding to Facets, but it would have
+ 369915 [jbarnette@gm] lambda { |x| p x +=3D 1; redo }[0]

File Contents into Hash Table?
368468 [jamesrasmus@] I'm trying put some file contents into a hash table. The file contains
+ 368470 [jamesrasmus@] hash_table = file_contents.each { |line| Hash[line.to_s] }
| 368473 [pejuko@gm il] hash = {}
| 368477 [jamesrasmus@] I tried your method, and debugging, it looks like all the key value
| 368482 [pejuko@gm il] that is strange our both codes are working well with given example
| 368483 [jamesrasmus@] Ha, It's all sorted now. There was something wrong with the charset of
+ 368476 [shortcutter@] That line is dysfunctional.  Please kick this Perlism out of your Ruby

how about Array#collect_until
368471 [timrandg@gm ] I am wondering if anyone has implemented an Array#collect_until method
+ 368474 [shortcutter@] This would not work - it does not even parse
+ 368475 [timrandg@gm ] Here is an awful hacked solution...perhaps someone come up with a
+ 368478 [matz@ru y- a] How about using
| 368480 [stevena@ar o] I think he was thinking of something more like collect_unless, a =
+ 368481 [stevena@ar o] You can't pass an anonymous function using the syntax you're using.  You =
+ 368488 [fred@la av .] class Array
| 368518 [timrandg@gm ] Thanks everyone for the great ideas. I ended up slightly modifying
| 368519 [shortcutter@] I would rather place this code in Enumerable.  Then all other classes
| 368535 [timrandg@gm ] Good idea.
| 368537 [cmdicely@gm ] Okay.. I misunderstood the intent. So you can't use the
+ 368522 [cmdicely@gm ] I know you already got something that works, but I think this is a
  + 368534 [botpena@gm i] nice. i'd add that to my lib if you don't mind ;-)
  + 368536 [timrandg@gm ] Thanks for another useful answer.

Re: May I know that why the zz=="s" return false, please?
368484 [jayaoscarlok] Thanks for all of you!!!

error handling  with exceptions  in  multi-thread  download
368490 [myocean135@y] there are three  program fragments,all of them  have same problems,
+ 368493 [blambeau@gm ] rescue Timeout::Error => e
| 368495 [myocean135@y] i have omitted many lines of  code,no TimeOut error,
+ 368497 [shortcutter@] lems,
  368502 [myocean135@y] require 'rubygems'
  + 368503 [myocean135@y] sorry for that: def  self.getdaystock(fromdate)
  + 368512 [shortcutter@] Well, there you have it.  The error is in your exception handling code.

How to make a ruby script listining for interactivity?
368496 [bvb@va co co] I would like to know if I can make a ruby script interactive. I don't
+ 368624 [sentinel1879] Wow ! this sounds like just what i have sorely been wanting. I have
+ 368651 [sean.ohalpin] You could try ruby-debug.

Shoes as Gems or other such
368498 [handigandy-e] I was just checking out shoes. While I like it, I am a bit concerned.
+ 368505 [rogerpack200] I'm not aware of one as shoes was basically "it's own fork" of Ruby.
+ 368507 [luislavena@g] Basically Shoes does lot of initialization to the graphic framework
+ 368509 [steve@st ve ] Hey there, thanks for the interest in Shoes!

Help with photo album app
368501 [trevor@nu en] I'm developing a photo album app that has albums, with pictures
368541 [josh.cheek@g] I assume you are using Rails (this is a Ruby mailing list, not a Ruby on

ruby-ldap in Netbeans
368504 [hmmedina@gm ] I'm a newbie at Ruby and I have the following issue.  I need to
368637 [headius@he d] Go to the Tools menu, under "Ruby Gems". I believe you can install it

select tr>3  with nokogiri
368506 [myocean135@y] i want to get  row which it contains  more than 3  columns
+ 368542 [myocean135@y] for  example,
| 368544 [ammarabuali@] document.xpath("//*[count(td)=2]")
| 368551 [myocean135@y] p1
| 368552 [myocean135@y] document.xpath("//*[count(td)=2]")  is  right,but  i want to know
| 368553 [ammarabuali@] If the table is not the root or directly inside the root, you need 2
| 368580 [myocean135@y] think Ammar ,one problem vanish,another occur.
+ 368579 [kbloom@gm il] doc.xpath('/html/body/table/tr[count(td)>3]')
  368581 [myocean135@y] <table>
  368582 [ammarabuali@] I don't know if "not" is valid like that,  I have to double check. But
  368583 [myocean135@y] i found they are equal between  not and !=  in nokogiri xpath
  368584 [myocean135@y] a friend tell me,
  368585 [ammarabuali@] That's good. Another possible approach is using following-sibling, if