403211-403875 subjects 403688-412480

building expressions in strings
403447 [uzleepito@gm] In my program I need to combine together two Ruby expressions with

[ANN] asciiart 0.0.3 released
403449 [beholdthepan] The asciiart gem is a way to convert local files or URLs into command line

How do I unsubscribe from the mailing list?
403455 [lists@ru y- ] I have sent "unsubscribe" in the body to ruby-talk-ctl@ruby-lang.org
+ 403458 [normalperson] Can you make sure your email client is sending a text/plain message
+ 403462 [lists@ru y- ] Hmmm, I will try to do that.  Might be a problem with Outlook.com...
+ 403463 [lists@ru y- ] Took a few tries but it worked in plain text mode using the old hotmail.

Can we attach documents to excel columns using Ruby?
403456 [lists@ru y- ] Suppose I do have some folders in a directory. Now say directory name
+ 403457 [sophrinix@gm] roo or spreadsheet gem. The rest is just a standard file upload if this is
| 403459 [lists@ru y- ] I want to upload the files into excel column, from the "local drive",
+ 403472 [lists@ru y- ] Yes, win32ole, it's packed with Ruby. Take a look at this website: http://rubyonwindows.blogspot.com.ar/search/label/excel
| 403481 [lists@ru y- ] OMG!! Excellent reference you have provided. `+1` to you. Thank you very much. I will sure give it a try,hope what I am looking for ward,surely would get from here.
| 403484 [lists@ru y- ] You can be sure that that will work. You can also add colors, format
| 403528 [lists@ru y- ] Can any one help me for the below code, which I draft to meet my above
+ 403530 [lists@ru y- ] wbs.OLEObjects.Add(,full_path,False,True,,,f,)
+ 403531 [lists@ru y- ] Continued (couldn't edit, out of time)
| 403532 [lists@ru y- ] Dir.entries("E:\\WIPData\\Ruby").each do |f|
+ 403533 [lists@ru y- ] The whole point of using a Hash as an argument is so that you don't have
+ 403538 [lists@ru y- ] It appears that you are passing in '.' and '..' into your Dir.entries

Enum#select with max number of items
403464 [lists@ru y- ] My premise is that i have a large array that i'd like to iterate with
+ 403465 [lists@ru y- ] Not sure about one-liners, but you can replace the matches integer with
+ 403467 [shortcutter@] irb(main):003:0> 1_000_000.times.inject([]) {|a,x| a << x if x.odd?;
| 403497 [lists@ru y- ] This is clever but is there a specific technical reason for using 'and'.
+ 403471 [matma.rex@gm] You could try out the lazy iterators in Ruby 2.0. The preview has been made available recently, and there are articles about this online already.

How to create a continuous process with some cmd calls using ruby rake in Windows?
403468 [lists@ru y- ] I'm trying to run some windows command line calls in the same system

General Ruby syntax questions
403473 [lists@ru y- ] these examples are doing. I've used c++ a little, but I'm new to Ruby.
+ 403474 [me@da id wd ] Err if you've used C++ even a little then 99% of that should make
+ 403475 [matthew@ke w] First, a question: where did you find this code? It's not what we could
| 403480 [sto.mar@we .] Or (as an exercise) at least without using the while loop, e.g.
| 403482 [shortcutter@] We can make it a little shorter by using *=
+ 403476 [lists@ru y- ] Thanks Matthew. I have one single question about the first section of
  403477 [matthew@ke w] By convention, in most programming contexts, 'i' is often to count
  403478 [fluido@fl id] Comes from Fortran, where, unless otherwise specified, variables whose
  403479 [matthew@ke w] I did not know that. Cool, thanks Carlo.

How to get the values - "ipad,iPod" using "xpath:" concept?
403486 [lists@ru y- ] <ul id="globalnav" role="navigation">
+ 403487 [shortcutter@] It's not clear what you want to use a selection criteria.  Is it
| 403488 [lists@ru y- ] I want to get the values as mentioned in the subject using `xpath` with
| 403489 [shortcutter@] That does not answer my questions.  You want to get those values based
| 403491 [lists@ru y- ] Here is my answer
+ 403492 [atma@co va e] There are a lot of ruby tools that can do that. Nokogiri can do it easily. Watch this: http://railscasts.com/episodes/190-screen-scraping-with-nokogiri

window design
403490 [lists@ru y- ] It should have a toolbar, a menubar and toolbar below should have 3

Re: Ruby + Selenium: Reuse open browser session [HELP] [SOLVED]
403493 [lists@ru y- ] Joel,

Gem loads in irb but not console
403494 [lists@ru y- ] I have the next problem: I was install a gem. The gem work well in
+ 403495 [chris.hulan@] running 2 separate ruby commands creates 2 separate processes
+ 403496 [stefano.croc] When you use IRB, you have a single ruby interpreter running, which executes

Re: Gem loads in irb but not in Eclipse
403498 [lists@ru y- ] Chris, Stefano, thanks for the response, but the problem is other. In

403505 [uzleepito@gm] Is there any way to somehow redefine operations like '&&' between my
+ 403506 [matma.rex@gm] Since I think Ruby 1.9 you can redefine the unary `!` operator (class A; def !; true; end end). This will also change the behavior of `not`.
+ 403513 [shortcutter@] See Matma's reply.  Why do you think you need to redefine behavior of
  403514 [uzleepito@gm] Why do you think you need to redefine behavior of these operators?
  403517 [shortcutter@] Ah, I see.

[ANN] MountainWest RubyConf 2013 Registration Open
403508 [blowmage@gm ] I am very happy to announce that registration is open for MountainWest

Soft object reference for mark and sweep
403509 [garthy_lmklt] I recall a mention a bit back about wanting to see more interesting
403510 [uzleepito@gm] Just a silly one:  if you seldom use that Hash in the store, you can
+ 403511 [garthy_lmklt] Thankyou for the input, and no, it's not silly. :) It's opened up the
+ 403512 [shortcutter@] I think using WeakReference is even better because ObjectSpace lookup
  403519 [garthy_lmklt] Thanks for that. I didn't even know WeakRef existed! That's going to
  404175 [headius@he d] I strongly discourage using WeakRef for its delegate interface. It's a
  404529 [garthy_lmklt] Thankyou for your thoughts on this one. Apologies for my slow reply-

Combine 3 hash into one
403515 [lists@ru y- ] I am trying to marge 3 hash  :  hash1["errors"] ,hash2["errors"],hash3
+ 403516 [transfire@gm] ...
+ 403520 [tamouse.list] hash1.merge(hash2).merge(hash3)

[ANN] rubygems roots-1.0.0
403521 [lists@ru y- ] This is an announcement of the release of rubygems 'roots-1.0.0'.

Re: gem install mysql2 error
403522 [lists@ru y- ] I have Windows 7.   I am trying to get the gem installed for MySQL

How to start working on reby on rails
403524 [lists@ru y- ] I am new to Ruby on Rails  actually i am .net developer, i installed
+ 403525 [shortcutter@] I suspect it's better to ask this on a Rails forum.  Don't they have
+ 403526 [wbrisett@at ] Michael's book is a great resource.
  403529 [lists@ru y- ] The above tutorial is really good for beginners.

ActiveRecord class for multiple tables
403539 [lists@ru y- ] I assume that this has been answered, I just haven't been able to find

Please explain in English
403540 [lists@ru y- ] I'm learning Ruby and I'm reading some expression that I saw on the
+ 403541 [wbrisett@at ] For those more versed than myself, I have a follow on question (thank for
| + 403544 [wbrisett@at ] nevermind... Now I see what's going on. (just had to run it in irb and look at
| + 403545 [jgabrielygal] You could, using inject, but some people might say this is less
+ 403542 [jgabrielygal] That's not a very idiomatic way, because the result of the map
| + 403547 [lists@ru y- ] I tried benchmarking out of curiosity and that is a lot faster! Nicely done.
| | 403549 [jgabrielygal] I guess the reason is that you avoid the intermediate arrays.
| | 403565 [ryand-ruby@z] On Jan 28, 2013, at 12:13 , Jes=FAs Gabriel y Gal=E1n =
| | 403570 [jgabrielygal] Sure, you are right. I didn't really read Joel's proposal, and assume
| + 403569 [shortcutter@] Hash.new(0).tap do |res|
|   403577 [wbrisett@at ] As usual Robert, you've shown me a very elegant way to handle this! Thanks!
|   403686 [shortcutter@] You're welcome!  But I think the elegance is rather due to language
+ 403543 [keystonelemu] Regex is critical to this one. \w is word boundary. Scan returns everything
+ 403546 [lists@ru y- ] I'll try to break it down, let us know if there's anything further that
| 403564 [ryand-ruby@z] This modifies the argument coming in. Don't ever call downcase! or other =
| + 403568 [lists@ru y- ] Thanks, I thought that those two things were equivalent.
| + 403572 [lists@ru y- ] Ah, I didn't know that a bang method would also change the argument
|   403576 [shortcutter@] That's why there is the exclamation mark in the first place.  It means
+ 403579 [lists@ru y- ] i have a project in netbeans 6.8. I created a global module so...
  403603 [shortcutter@] First of all, please do not hijack other threads.  Then, please

[SEC][ANN] Rails 3.0.20, and 2.3.16 have been released!
403550 [tenderlove@r] I'd like to announce that 3.0.20, and 2.3.15 have been released.  These rel=
403551 [sophrinix@gm] First, I'd like to thank you Aaron for your hard work in handling security
403552 [sophrinix@gm] I didn't mean for that text to be huge.. sorry.

Learning Ruby and proving your knowledge
403553 [lists@ru y- ] Hey all,
+ 403593 [lists@ru y- ] I liked the site a lot! I'd say my biggest piece of feedback is that
+ 403677 [lists@ru y- ] I've tried creating some questions on the site, but I can't figure out
+ 403679 [lists@ru y- ] occasionally to the Challenges, but are really looking to our users to
+ 403695 [lists@ru y- ] Thanks for looking into it, I like the concept.
+ 403730 [lists@ru y- ] Looks like someone fixed the lines issue.
+ 403732 [lists@ru y- ] Yep, just recently pushed changes to fix the spacing issue!
+ 403761 [lists@ru y- ] Thanks. No worries about the misunderstanding, I know it's all still
+ 403789 [lists@ru y- ] I knew it looked familiar! I have an unhealthy addiction with the entire
+ 403791 [lists@ru y- ] Good man! I even bought the Deluxe version of BTD5 :)
+ 403793 [lists@ru y- ] Ha! I would have found your Challenge fiendish no matter how much time I
+ 403795 [lists@ru y- ] important that people use their real identities, and having a social
+ 403801 [lists@ru y- ] you cant make a test without register, so you cant see if its worth to
+ 403805 [lists@ru y- ] We thought it was important for scores and submissions to be visible to
+ 403810 [lists@ru y- ] In any case, the addictive nature of the "achievement" system is a great
| 403811 [kartik.kotta] Nice Site! I like it.
+ 403812 [lists@ru y- ] especially liked the Calacanis piece -- I'm going to start using his
| 403825 [lists@ru y- ] As an Aspie myself, I often find it difficult to identify with people
+ 403855 [lists@ru y- ] Amen! I always find that my lasting relationships are the ones where we

[ANN] Rack 1.5.1, a modular Ruby webserver interface
403554 [jftucker@gm ] Today we are proud to announce the release of Rack 1.5.1.

Confusion with some File::methods
403555 [lists@ru y- ] (a) How does absolute_path(file_nam) differ from
403652 [lists@ru y- ] It will use the present working directory unless you specify otherwise.

using Ruby + XUL in client-side
403559 [lists@ru y- ] How can I use Mozilla's XUL for writing a complete GUI in Ruby for
403561 [jonanscheffl] What a beautiful game. I just pledged $22 to back the project so if he

[ANN] rroonga 2.1.3
403560 [yoshihara@cl] We released rroonga 2.1.3.

Re: Unsubscribe confirmation request
403580 [evan@ne ze .] unsubscribe-confirm 2013013002425829110364557230 evan neezer.net

newbie question..
403581 [lists@ru y- ] So I'm taking a class on Ruby and it seems as though the teacher has
+ 403582 [wbrisett@at ] Since this is classwork, I won't give you the answer, but. Here's some things I
| 403583 [ryan@ra to m] For the same reason, I won't give you any answers, but your problem
| 403596 [tamouse.list] Ok, I admit I'm stumped -- I don't get how to use a Hash inside an
| 403597 [tamouse.list] Never mind, I got it...
| 403598 [ryan@ra to m] Out of curiosity, what did you do to get it working? I played around in
| + 403601 [prasad.c82@g] u can try this,
| + 403681 [tamouse.list] I forgot one of ruby's basic things. It always returns the last value
+ 403584 [lists@ru y- ] There are tons of examples on the web (and this forum) as to how to
| + 403585 [wbrisett@at ] And the minute I saw hash, a new answer dawned on me... ;) That's why I enjoy
| + 403586 [lists@ru y- ] I guess it's time for me to jump ahead of our current skill-set!
+ 403592 [lists@ru y- ] There's always the option of handy methods like split, uniq, scan, and

ruby array to list
403587 [lists@ru y- ] I dont know if i can do this or is there is any way to implement the
+ 403588 [stefano.croc] Look at Array#join
+ 403589 [ryan@ra to m] <this is a joke>
+ 403591 [adigitalnati] Robert, try

Linux mode bits
403590 [lists@ru y- ] Is there a class available for handling the Linux mode bits? i.e.
+ 403594 [tamouse.list] 1.9.3-head :007 > "%o" % File.stat('.emacs').mode
+ 403595 [sduncan@we a] Sadly the symbolic constants are not exposed (afaik). You can define
+ 403599 [lists@ru y- ] OK. That's what I had assumed.
+ 403600 [lists@ru y- ] OK, so I've attached what I have...I think it works correctly :-)

SSLSocket in non-blocking mode
403604 [lists@ru y- ] I've had a little trouble getting SSLSocket to behave as I want it to.
+ 403666 [lists@ru y- ] I've done some more work on this since posting, and tested out an idea I
| 403668 [tony.arcieri] Are you not aware OpenSSL::SSL::SSLSocket has a #read_nonblock method?
+ 403682 [lists@ru y- ] ... but according to irb, yes! Thanks
  403683 [tony.arcieri] Tony Arcieri

(Errno::EINVAL) occurs during the File::rename() execution
403607 [lists@ru y- ] renaming file new name should be preceded with the Directory name into
+ 403609 [wbrisett@at ] I believe the issue is how the read is being done.
| 403610 [lists@ru y- ] Okay! Thanks,
+ 403619 [lists@ru y- ] Posted via http://www.ruby-forum.com/.
| 403625 [lists@ru y- ] I suspect if there is any upper-limit on the length of the argument we
+ 403626 [lists@ru y- ] If there's a length limit, try renaming using only the basename and then
  403627 [lists@ru y- ] file_new_name.gsub!(/[\x00\/\\:\*\?\"<>\|]/, '_')
  403629 [lists@ru y- ] After doing a bit research I found that there is a file called
  403630 [wbrisett@at ] Look at the Ruby Gem UNF. I think that should solve your problem.
  403631 [lists@ru y- ] Can you do the required change in my code?
  403632 [wbrisett@at ] I've never used it but it looks like all you have to do is: .to_unf
  403685 [lists@ru y- ] Can anyone help me here?

Fail if file isn't present?
403608 [wbrisett@at ] I seem to be missing something. If I don't have any .js files in my input
403618 [peterhickman] There is nothing wrong with iterating over an empty list. This will not

Two FREE days of CodeSchool!
403628 [rubytalk2dav] CodeSchool, home of Rails for Zombies and other courses on Ruby,
403658 [ryand-ruby@z] Eww. Not here.

Is there any difference between Dir::exist? and Dir::::exists?
403633 [lists@ru y- ] Can anyone help me here to understand the difference between them with
+ 403638 [lists@ru y- ] "Dir::::exists?" doesn't exist.
+ 403640 [shortcutter@] That is a syntax error.  I guess you mean Dir::exists?.

[ANN] Ruby-GNOME2 1.2.1
403639 [kou@co mi ng] The Ruby-GNOME2 project released Ruby-GNOME2 1.2.1.

How to copy the directory files only to another directory?
403642 [lists@ru y- ] Test1               Test2            Test3        Test4
+ 403643 [lists@ru y- ] You shouldn't be doing anything in "C:\".
| 403645 [lists@ru y- ] I just want to copy only - a.pdf,b.pdf,c.txt,e.docx, m.txt,aa.pdf files
+ 403646 [lists@ru y- ] Dir.chdir 'C:/'
| + 403647 [lists@ru y- ] Nice idea! But as an example i used such .txt,.pdf extensions. But there
| + 403706 [lists@ru y- ] The above code during renaming deleting the file also from here
|   403708 [tamouse.list] When you rename something, you are moving it -- if you wish to retain
+ 403648 [lists@ru y- ] The example I gave you only copies the files, not the directories. You
| 403649 [lists@ru y- ] Yes,that I understood,but What I am trying to say is in my case the file
+ 403650 [lists@ru y- ] As above,
| 403651 [lists@ru y- ] irb(main):001:0> Dir.pwd
+ 403653 [lists@ru y- ] If you don't get the relative path you can't move the file, because you
| 403654 [lists@ru y- ] Perfect! Thanks for your help.
| 403707 [tamouse.list] I think you may need/want to test for file-ness (and not directory- or
| 403714 [lists@ru y- ] nice idea! thank you very much :)
+ 403709 [lists@ru y- ] Oops, I didn't read your request carefully enough the first time.
| 403711 [lists@ru y- ] Thanks you @Joel
+ 403712 [lists@ru y- ] No problem, I learned some new stuff writing that.

403644 [lists@ru y- ] Please correct if my understanding is wrong for the below code:-
403655 [shortcutter@] I personally prefer to put the "true" before the "rescue" because this

Does Ruby has any default database with it?
403656 [lists@ru y- ] I will do webpage scraping using Ruby and required Gems. But looking for
+ 403657 [keystonelemu] Normally sqlite is the go to being that it's the default of rails. Check
| 403659 [colby.callah] Doesn't Rails come with a built in database called Brick?  No additional
| + 403660 [lists@ru y- ] But I need with Ruby 1.9.3. I am not a ROR developer.
| + 403661 [hassan.schro] No, you might be thinking about WEBrick, the web server that's a
|   403662 [lists@ru y- ] @Hassan
|   + 403663 [keystonelemu] Fairly sure MySQL and Sqlite are OS. Then again, much more than that and
|   + 403664 [hassan.schro] Yes. Really, the choice depends on your use case(s), platform, and
|     + 403665 [lists@ru y- ] I need 4 tables with more or less 40,000 rows in each,which must be
|     + 403669 [strausscasse] what good is your help hasan if you are going to complain about it
|       403670 [lists@ru y- ] Didn't get your point @Strauss
+ 403667 [justincollin] dbm, gdbm, YAML::DBM, pstore
| + 403671 [tony.arcieri] Hey look at that, finally someone with the right answer.
| | 403674 [lists@ru y- ] Yes,bug Ruby : SDBM documentation is not good. Only list of method
| | 403678 [justincollin] Geez, how could I forget SDBM???
| | 403735 [tamouse.list] I think the best course for a new project is to start simple, go with
| | 403739 [lists@ru y- ] My concern is - Does "Sqllite3" capable of storing 30000 rows in each
| | + 403745 [fluido@fl id] If you want to adopt a database engine, you'd better read some of the
| | | 403747 [lists@ru y- ] Thank you very much! That's the information I was looking from you like
| | | 403755 [shortcutter@] If it's just 30,000 items then Marshal or PStore might do as well.  If
| | | 403759 [tony.arcieri] Note PStore really sucks because it rewrites the entire database every
| | | 403764 [shortcutter@] It's a tool.  There are use cases where it's appropriate and others
| | + 403819 [tamouse.list] It might depend on how many tables, how many fields in each table, and
| | + 403953 [Reid.Thompso] easily.
| + 403672 [keystonelemu] Though if you don't know raw SQL you're in for some troubles. Study sql and
|   403673 [lists@ru y- ] @Brandon - I am 3 years of experienced with Oracle Sql,PL-sql. So Sql is
|   403676 [keystonelemu] Making sure. You can never tell some times.
+ 403675 [Reid.Thompso] PostgreSQL or Sqlite would be what I'd recommend.