301330-314161 subjects 301744-303506

^ Handling of arrays
301528 [clement.ow a] $selections = ["*","*"]
301542 [jgabrielygal] src1 = $file_exception.inject(Dir.glob(src)) {|result, ex| result -
301602 [clement.ow a] nice slick code there using regexp ;) just wondering if there would be a
301611 [jgabrielygal] If what you want is to associate different information to each source path,
301719 [clement.ow a] thanks Jesus, that was really helpful! However I altered the code alil
+ 301732 [clement.ow a] Also, I have problems making some file exceptions. For example, i ahve
| 301755 [jgabrielygal] I'm not sure if I'm understanding you correctly, but you can tweak the
| 301844 [clement.ow a] Nah, it's fine, we all know it can get a lil tiring sometimes. As it is
| 301851 [clement.ow a] After much playing around with this statement,result here is the whole
| 301863 [clement.ow a] I found what is actually goin on in this statement. because x is the
| 301957 [jgabrielygal] Enumerable#inject is a very powerful iterator (in my opinion at
| 301958 [jgabrielygal] I have realized that this sentence can be confusing: the accumulator doesn'=
| 301959 [shortcutter ] n't
| 301961 [jgabrielygal] nd
+ 301754 [jgabrielygal] Sorry, that's what I get for not testing the code. I think (I'm a bit

^ Re: Looking for a Sudoku Algorithm to implement in Ruby
301532 [koflerjim ma] Sudoku solver in Ruby using SAT (Boolean satisfiability problem)

^ rotation of photos
301538 [sunny_bogawa] album photos, i want to developed a functionality where i can rotate
301543 [gary Lowder.] Look at http://rmagick.rubyforge.org/

^ Other languages Was: Re: Looking for a Sudoku Algorithm to implement in Ruby
301544 [jan.svitok g] Welcome!

^ Constants, Bindings and instance_eval
301547 [die_gabel we] Dear rubyists,
+ 301580 [globyy3000 h] class A
+ 301582 [albertschlef] That's an interesting question!

^ Net:HTTP post question
301548 [raasdnil gma] Heya all,
301560 [boesemar gmx] I just read that WWW::Mechanize has an interface for fileuploads, see
301604 [raasdnil gma] Looks perfect, thanks :)

^ Cover a directory and put all the stuff in a TreeView
301556 [eloi.plans c] Given a directory, for example /home, I would like to take ALL the
+ 301557 [ymendel pobo] What makes /home/a1 and /home/a2 the children of /home/a? They're not /
| 301559 [eloi.plans c] Errr yeah well, that's the idea, maybe I expressed it bad.
+ 301558 [boesemar gmx] Call a function recursively when you hit a directory. This will output
+ 310692 [mailtokamat ] Below code can be used to convert directory structure in xml.

^ regexp+hash problem
301561 [jean-christo] I becoming totally mad about this simple script, whose goal is to
+ 301566 [sandro.pagan] Why don't use Date.strptime to match the date info ?
| 301585 [s.korteling ] require 'date'
+ 301568 [bbxx789_05ss] fileName = "data.txt"
+ 301570 [AEtzold gmx.] I think this is due to the fact that you have sometimes one, sometimes
+ 301573 [caduceass gm] Just FYI, this is effectively the same as...

^ Ruby, HPUX and rubygems
301562 [stephen.odon] So I have the less than enjoyable of installing Ruby on a PA-RISC HPUX
301565 [kyleaschmitt] stephen,
301659 [stephen.odon] I have battled with it a long way, and it gets really far into

^ [ANN] rb++ / rbgccxml 0.1.1 bugfix release
301569 [jameskilton ] == CHANGELOG
301572 [AEtzold gmx.] Dear Jason,
301574 [jameskilton ] ese)

^ array diff
301575 [jdechiaro co] I am new to ruby and trying to do a diff on two csv files.
+ 301577 [AEtzold gmx.] James,
+ 301579 [globyy3000 h] Same thing basically but none-the-less this would also work..
  301588 [jdechiaro co] Thanks for your responses
  301592 [adam.shelly ] records.collect do |row| row[1].eql?(SumArray)
  301630 [jdechiaro co] if SumArray.include?(row[1])did the trick...thanks adam!
  301740 [shortcutter ] You might also want to consider using Set or Hash for more efficient
  301742 [jdechiaro co] Thanks for the tip Robert I will give it a go...as the script has been
  301814 [shortcutter ] Yet another approach would be to use a relational database for this.  If
  301822 [caduceass gm] I agree that a large dataset like this probably doesn't belong in the

^ Source code from complex user interfaces RUBY GTK
301576 [eloi.plans c] I've just started creating user interfaces with Ruby GTK and I would
+ 301578 [AEtzold gmx.] I've particularly liked Hal Fulton's Ruby Way (there's
| 301584 [eloi.plans c] But I do have to pay for that :S?
| 301586 [cmdjackryan ] Well, yeah. Otherwise, The Ruby-GNOME2 project page has examples, too,
+ 301587 [albertschlef] I'm not sure a book is the best choice. You don't know what's in the
  301591 [cmdjackryan ] Except Ruby-GNOME2 isn't distributed as gem, and thus gems cannot depend
  301615 [albertschlef] On the one hand you say packages don't depend on some non-existing
  + 301620 [shevegen lin] The best way is to
  + 301642 [cmdjackryan ] Yes.

^ This Week in Ruby (May 12, 2008)
301581 [acangiano gm] Cheers,

^ Problem with files comparing
301589 [happy.go.luc] My problem is to compare two files in the same directory as the program
301590 [dave pragpro] You probably need to call your function.
301593 [happy.go.luc] I tried put them in a class, and tested, but it kept throwing me the
301594 [dave pragpro] 1. It's relatively unusual to create instances of a class inside the
301663 [happy.go.luc] compare is a std mathod in ftools.rb
301664 [dave pragpro] Then you'd need to say File.compare, and not just compare.
301676 [happy.go.luc] Ok. I c. Thanks man

^ help re manual RubyGems update?
301601 [greg.hauptma] I'm installing on Windows latest version of Ruby (on-click).  Then I'm
301681 [luislavena g] On May 13, 12:17 am, Greg Hauptmann <greg.hauptmann.r...@gmail.com>

^ about writing file???
301606 [hb.pat87 hot] I use this
+ 301607 [cmdjackryan ] You can't. All it needs is the correct privileges to access the file.
+ 301610 [fox nscl.msu] If you just want to prevent casual/accidental, rather than
  301617 [albertschlef] Does 0440 work on windows too?
  301735 [fox nscl.msu] Yes, but I did get the arguments backwards.
  301736 [hb.pat87 hot] thx you I will try with it :)
  302394 [hb.pat87 hot] It's not work! :'(
  302415 [cmdjackryan ] And you will not be able to change that behavior, short of shipping your

^ [ANN] ofx-parser 1.0.2 Released
301608 [andy tinnedf] ofx-parser version 1.0.2 has been released!

^ About Editors
301612 [kittu_mohan2] ruby enthusiast i would like to dig in to it to the extent possible for
301613 [pikEISPAMMMs] The best editor is the one you like and know best. This is a *lovely*
301638 [JAMES.T.MCLA] charset="UTF-8"

^ OOPS Ruby
301614 [lokesh_agraw] charset="US-ASCII"
301628 [znmeb cesmai] I'd start with Russ Olsen's "Design Patterns in Ruby".

^ problem in migrating
301616 [rizzwanabanu] I have stuck in problem could you please get me out of it. whenever i
301644 [cmdjackryan ] Can Ruby find it? It does not mean the openssl.rb, but either an

^ Re: termination of my ruby apps leads to error
301619 [boesemar gmx] If I am not mistaken it's the SIGINT handler that produces the trace (assuming

^ How to convert character to hexadecimal?
301623 [ibc aliax.ne] SGksIEkgd2FudCB0byBjb252ZXJ0IHNvbWUgY2hhcmFjdGVyZXMgdG8gaGV4YWRlY2ltYWw6Cgog
+ 301629 [sepp2k googl] =3D> "x20"
| + 301634 [Rob AgileCon] " ".unpack('H*')[0]
| | 301636 [ibc aliax.ne] MjAwOC81LzEzLCBSb2IgQmllZGVuaGFybiA8Um9iQGFnaWxlY29uc3VsdGluZ2xsYy5jb20+OgoK
| | 301639 [chris.hulan ] I think ' '[0].to_s.hex will produce the value and be a bit easier to
| | 301667 [bbxx789_05ss] Besides being a candidate to win a code obfuscation competition, your
| | + 301671 [bbxx789_05ss] ..and the hex method having a misleading name.  Why anyone would call a
| | | 301672 [sepp2k googl] Agreed on the misleading name, but not on Integers being "decimal numbers".
| | | 301674 [bbxx789_05ss] You can only interpret the meaning of an Integer in reference to some
| | | 301675 [sepp2k googl] How does an Integer whose base is 10 differ from an Integer whose base is
| | | 301679 [bbxx789_05ss] How ruby handles Integers has no bearing on whether a number is called a
| | | 301680 [sepp2k googl] Then I ask you again what does have a bearing on that?
| | | + 301683 [Gennady.Byst] PiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBTZWJhc3RpYW4gSHVuZ2VyZWNr
| | | | 301685 [sepp2k googl] Exactly my point.
| | | + 301717 [bbxx789_05ss] x is not a number--x is a variable.  After the assignment, x refers to
| | |   + 301726 [sepp2k googl] Sure, but the Integer doesn't have any idea what kind of literal it was
| | |   + 301733 [overlord gmx] And an integer literal is a string representation of an Integer. And
| | + 301757 [chris.hulan ] Thanks 7, i totally misrad what hex does...thats what I get for
| + 301635 [ibc aliax.ne] MjAwOC81LzEzLCBTZWJhc3RpYW4gSHVuZ2VyZWNrZXIgPHNlcHAya0Bnb29nbGVtYWlsLmNvbT46
|   301643 [sepp2k googl] There's no such thing as a character or a hexedecimal value in ruby.
+ 301637 [s.korteling ] " "[0].to_s(16)

^ disable regexp warning
301625 [gaspard teti] Is there a way to disable regexp warning ?
301632 [flo andersgr] I don't see your problem.
301730 [gaspard teti] This is crazy. When I write a simple test case with your example it
301753 [rick.denatal] Well the regexp you're testing IS valid, perhaps it's not the regexp
301823 [gaspard teti] There is a space after '#'. The test actually makes sure no one can
302187 [gaspard teti] I still cannot find a solution to disable regex warning in the
302190 [phasis gmail] def valid_regexp?(str)
302202 [gaspard teti] Thanks Heesob Park !

^ Updating all values in a Hash
301640 [p.dugdale gm] Does anyone know a good way to update all values in a hash.
+ 301646 [sepp2k googl] hash.each {|k,v| v.downcase!}
+ 301648 [tim.pease gm] h = {1 => 'ONE', 2 => 'TWO'}
+ 301649 [sandro.pagan] I found this way
  301652 [dblack rubyp] That's very resourceful (I'm fully in favor of extending individual
  301655 [p.dugdale gm] Sorry! I was trying to keep my post simple, but ended up doing a really
  + 301658 [sepp2k googl] You always pass by reference, but you pass a reference to the object (a
  | + 301701 [rick.denatal] a = "Fred"
  | + 301713 [dblack rubyp] I'd put it differently, and I know this sounds convoluted but I think
  + 301660 [shortcutter ] A reference is indeed passed to the block.  There is no copying of

^ hash merge
301645 [tim.wolak gm] I'm not sure if I'm using this the right way and I'm hoping you guys can
+ 301650 [ymendel pobo] I'm not finding that to be the case.
| + 301653 [tim.wolak gm] a = { 54540 => 10345, 55550 => 30555 }
| | 301654 [s.korteling ] Are you sure? I'll assume you meant value
| | 301656 [tim.wolak gm] You guys were right it is working, I was returning the wrong values.
| + 301662 [shortcutter ] irb(main):009:0> h = {1=>2}
|   301668 [adam.shelly ] irb(main):010:0> h={1,2}
|   301694 [shortcutter ] Amazing.  Thank you for the education!  I should have looked at the
+ 301651 [s.korteling ] Hash.merge will give you a new Hash, a third one. If somewhere outside

^ detail on a regex?
301657 [kyleaschmitt] Is there a way to pull details out of a regular expression's failure?
301666 [shortcutter ] If it does not match you get no information out of the regexp.  The
301693 [kyleaschmitt] Hum.  Yea, but I want the error messages to be helpful for when I'm
301706 [shortcutter ] Please do not top post.

^ requiring the same file and capturing the constants
301661 [neeraj.jsr g] file1.txt
301669 [vjoel path.b] If you have control over *how* the file is loaded, you can do this,

^ Problem with Active Record and Oracle using oracle_enhanced adapter
301673 [paqs140482 g] I'm having problem connecting activerecord and ruby with oracle_enhanced
301682 [paqs140482 g] /lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:692:in
302271 [yizhih gmail] r)

^ Ubuntu/Apache/Eruby
301677 [xcampanoli g] I have an eruby application that I need to run on a machine with apache
301678 [xcampanoli g] Never Mind.  I got it.  I did some searches again, presumably with a

^ modify output of script
301687 [kbrede gmail] I've got some LDAP data I'm trying to pipe into a ruby script.
301692 [jan.svitok g] Try simple state machine - either you are processing first group (then
301700 [shortcutter ] #!/bin/env ruby

^ Switch Two Lines in a File
301688 [dmerrick ics] Hey guys,
301689 [dmerrick ics] Oh, sorry, I should have mentioned, I'm providing two regexes, and the=20
+ 301695 [adam.shelly ] f= File.new(fname,File::RDWR)
+ 301705 [ snk gna.org] Here's my solution; thanks for the fun exercise.

^ require load error
301690 [fbogdanovic ] I installed 'hpricot' and 'wx' (wxruby) libraries with gem command and when
+ 301697 [cmdjackryan ] when
| 301704 [fbogdanovic ] require 'rubygems'
| 301708 [cmdjackryan ] 1.8.6
+ 301698 [caduceass gm] Maybe, you need require 'rubygems' first.

^ Failure trying 'gem contents'...?
301691 [xcampanoli g] root@rhaprpt:~# gem contents
301727 [ryand-ruby z] ??? the error message is pretty clear. if you want to see the contents

^ gem install of mongrel_cluster fails...
301696 [xcampanoli g] root@rhaprpt:~# gem install mongrel_cluster --include-dependencies
301699 [cmdjackryan ] Install the ruby-dev package (if you are on Ubuntu, for example). That
301702 [xcampanoli g] I am on a hardy install now, and apt-cache search 'ruby-dev' returns
301707 [cmdjackryan ] This is the package you seek.
301709 [xcampanoli g] Thank you for your help Phillip.  I find it this time searching for

^ rdoc breaks on some types of links
301714 [vjoel path.b] Not sure exactly which link is causing this, but it seems like bug in
301728 [ryand-ruby z] do you know how to repro that?
301778 [vjoel path.b] Sorry, that was very vague. I was hoping that it was something obvious
305135 [vjoel path.b] Ok found the cause of the bug, if it is a bug (maybe it's just a change
305136 [vjoel path.b] ...and there already a report of this, from April, in

^ Re: [QUIZ] The Turing Machine (#162)
301718 [jamesbkoppel] I was a little late submitting this week, so, rather than fleshing this solution out, I just challenged myself to write a short but good program. I think I did a pretty good job, at 33 lines of non-golfed code.

^ Tracking Ruby on Twitter
301720 [makenai gmai] I was having trouble finding some interesting rubyists to follow on
301923 [ shot hot.pl] What about polling similar stuff out of Hashtags? I=E2=80=99d guess it has
301925 [makenai gmai] Hash tags are cool if you set out with the idea of using them to

^ hpricot and regexp?
301721 [pood.forums ] I'm trying to grab the "cache date" off of the google search.
301722 [pood.forums ] oops, I mean, grep.
301723 [pood.forums ] date = cache_date.search('table table > td').inner_text.grep(/retrieved
301725 [dandiebolt y] <body>
301777 [pood.forums ] Dan Diebolt,

^ Re: Need help for finding difference between files
301724 [clement.ow a] What kinda difference do you wanna look at? is is file attributes?
+ 301779 [happy.go.luc] Ok, I need to compare the contents in 2 files. Print out each difference
| + 301784 [globyy3000 h] file1 = File.readlines("f1.txt")
| | 301801 [happy.go.luc] Thanks man. I found that using "-" can find all differences
| + 301785 [caduceass gm] If you don't mind reading the whole files in to memory, you can try
| | 301788 [caduceass gm] Sorry that's | and &, _not_ || and && and I had it backwards...
| + 301850 [reid.thompso] ...
+ 301856 [dsisnero gma] ruby diff-lcs will do this

^ Gecoder syntax question
301731 [AEtzold gmx.] Dear all,
+ 301737 [calamitates ] First off, your optimization problem seems to make little sense to me
| 301766 [AEtzold gmx.] Dear Peter and Andreas,
+ 301738 [ruby-talk lo] Gecode/R does not handle float values in constraints. What you could do

^ Problem installing buildr with rubygem on Windows XP
301734 [germandgw ya] I try to install the ruby building tool buildr with rubygems on Windows
301739 [cmdjackryan ] Newer RubyGems versions don't ask for the platform.

^ Ruby (Rdoc) documentation http://www.ruby-doc.org/core/
301741 [victor.reyes] Team,
301743 [jan.svitok g] - go to your ruby source dir, (c:\ruby\src\ruby-X.X.X-pX for Windows),
+ 301745 [victor.reyes] Thank you!
+ 301751 [jgabrielygal] Anybody know where this is in Ubuntu?. I'm being very dense this week,
  + 301756 [cmdjackryan ] You'll probably need the ruby1.8-dev package (or something similar).
  | 301758 [cmdjackryan ] Actually, you'll need something called ruby-src from Ubuntu compatible
  + 301761 [matt tidbits] It might not be anywhere. (It isn't anywhere on my Mac OS X machine.)
    301764 [jgabrielygal] s),