320390-327040

320207-324948 subjects 320611-412253

How does Ruby handle namespace?
320390 [youhaodeyi@g] In Java, it uses import to include other classes from other packages. In
+ 320391 [einarmagnus@] ruby -I includedir1:includedir2:etc app.rb
+ 320392 [b.candler@po] I'd say it's probably quicker to read the Ruby documentation on these
+ 320944 [t_lawetta@ya] I usually add elements (path names) to the value of the Array "$:"
  320974 [youhaodeyi@g] OK, thanks very much for your information.

[][100000000] = 1 whee!
320393 [Mike Austin ] items are added.  I could see where it would be convenient, but it also seems
+ 320399 [ruby@an hr p] Your answer is in your question. "One can, and should, use a hash as a
+ 320405 [charles.nutt] Because it's an array, not a sparse array.
  + 320463 [Mike Austin ] True enough :)  But what about in terms of practicality?  Does it make working
  | + 320465 [charles.nutt] No, it probably doesn't do a lot for arrays in general, but I suppose it
  | + 320502 [fox@ns l. su] I use arrays for other purposes... however the best answer is probably
  |   320560 [Mike Austin ] "The rule for ruby is that all decisions are made to make it more fun to
  + 320472 [transfire@gm] On Nov 17, 10:39=A0am, Charles Oliver Nutter <charles.nut...@sun.com>

Ruby equivalent to `find . -perm -g+rw -ls`
320400 [Bil.Kleb@gm ] I can't find a Ruby equivalent to
+ 320403 [funkaster@gm] maybe something like this?
| 320418 [Bil.Kleb@gm ] This is what I'm reduced to doing now.  It just feels wrong
| 320421 [funkaster@gm] that's correct.
+ 320420 [djberg96@gm ] Supporting strings for users and groups is trivial. Supporting symbolic
| 320424 [Bil.Kleb@gm ] Excellent; thanks.
| + 320450 [djberg96@gm ] I've already tested and committed the changes for the :user and :group changes.
| + 320670 [djberg96@gm ] file-find 0.2.2 has been released, which now supports names as well as
+ 322416 [djberg96@gm ] I just released file-find 0.2.4 which now does all your yak shaving

process dies on MAC ..
320401 [wbsurfver@gm] I do a fork and then waitpid2 with WNOHANG specified. This typically

Re: nokogiri 1.0.6 Released
320407 [mark@th ma z] Can the Reader interface do stream parsing =E0 la StaX? I couldn't tell
320527 [aaron@te de ] Not yet.  The normal doc parser will do streams right now.  SAX/Reader

INLINEDIR or HOME error
320409 [sitaramiredd] ...
320415 [mikeisgreat@] INLINEDIR="/path/to/homedir"
320416 [sitaramiredd] ...

How to extract links of a particular class type
320417 [sitaramiredd] ...
320425 [peter@ru yr ] btw. you should get the newest scRUBYt! , 0.4.05 which does *not*
320431 [sitaramiredd] ...
320434 [peter@ru yr ] ...
+ 320438 [sitaramiredd] ...
| 320439 [peter@ru yr ] ...
| 320447 [sitaramiredd] ...
| 320452 [peter@ru yr ] ...
| 321994 [vipin@is et ] I need to fetch some information from http://www.ebay.in.
| 322002 [peter@ru yr ] See my other post...
+ 327040 [remco.zwaan@] rank 1 - Title - url

undefined method 'each'
320419 [Joshua.Ball@] I am following along in Ben Scofield's book (Practical REST on Rails 2 Proj=
+ 320427 [bill.walton@] You should post this question to the Rails list at
+ 320428 [james.herdma] ...

Trying to run/install a list of files in order
320422 [chutenro@gm ] I'm pretty new to this whole thing, so I apologize in advance if this is

active records
320430 [einarmagnus@] Is there a way of listing available tables in a connected database?
320432 [peter@ru yr ] ...

[ANN] reek 0.3.1 Released
320441 [kevin@ru he ] reek version 0.3.1 has been released!

drb works on one system fails on other
320442 [megolds@sa d] Attached is a simple test program.  I'm running the server on Ubuntu
+ 320443 [hgs@dm .a .u] My first thought would be "firewall configuration".  Are there any errors
+ 320444 [megolds@sa d] Why, yes, Mike, I had a problem that was exactly like that.

function to select only certain key/value pairs from hash?
320446 [tennisbum200] Whenever Im coding I usually come across having to create a new hash
+ 320449 [cmshea@gm il] Hmm... I thought there was a built in method for that.  Here's one
| + 320451 [cmshea@gm il] Yeah, or the simpler: hash.reject {|k,v| ![:a,:b].include?(k)}
| + 320455 [einarmagnus@] That is ridiculously inefficient and weird :)
|   320456 [einarmagnus@] and now I see that I was stupd.
|   320457 [einarmagnus@] This is what I meant to do, a lot more efficient to look up the values
|   320462 [caduceass@gm] You will get nils for none existing keys that way.
|   + 320464 [einarmagnus@] result}
|   | 320466 [caduceass@gm] Good point.  The use of #inject, though, may cloud that performance analysi=
|   + 320484 [caduceass@gm] I'm not apologizing for the missing result[key] on the lhs, though I
+ 320473 [luc@ho k- on] I tried to resist making this a one-liner and went for the clean and
  320493 [transfire@gm] require 'facets/hash/slice'

Re: function to select only certain key/value pairs from has
320453 [s.korteling@] require 'facets'
320483 [b.candler@po] In ruby1.9, Hash#select returns another Hash. But you'd still be

Does SOCKSSocket work?
320454 [alan.wayne.j] ...
320460 [matz@ru y- a] First, you have to specify --enable-socks=true to configure (or
320480 [alan.wayne.j] ...

let my custom defined class convert to string?
320458 [rochkind@jh ] Is there any way I can make it so my custom-defined class can be
+ 320459 [einarmagnus@] class MyClass < String
+ 320469 [stefano.croc] Defining a to_str method makes String#+ work,  but I'm not sure it'll work
  320522 [rochkind@jh ] Thanks, that helps a lot, actually!
  320523 [rochkind@jh ] Ah, although not completely, when trying to do what I'm trying to do
  320549 [nefigah@gm i] The basic rule of thumb is that #to_s is for when we want something to

Subclassing Hash to enforce value uniqueness ala key uniqueness.
320461 [adam.oddfell] First of all, hello to everyone. This is my first message to this list.
+ 320471 [transfire@gm] You may be able to save yourself some time with a little meta
+ 320474 [sepp2k@go gl] Every time you add a value you iterate over all the other values to check
  + 320551 [shortcutter@] <snip>good example</snip>
  + 320552 [jcoglan@go g] ...
  + 320599 [sepp2k@go gl] This should return @key_value.dup=20

HELP DESK
320468 [megan156a@ya] HELP DESK

Re: Ruby and OpenSSL: no such file to load -- openssl (Runti
320477 [contact@ja u] Robert - thanks for the tip.

1.9 -> lambda syntax with &
320479 [farrel.lifso] Given
320481 [b.candler@po] It's not clear to me what you're trying to do.

I don't like specs, should I change my point of view ?
320482 [user@do ai .] look to specs I felt it was only syntaxic sugar driven by a big
+ 320485 [peter@ru yr ] ...
| 320525 [b.candler@po] +1 for Shoulda.
| + 320532 [ymendel@po o] @bar.should =3D=3D "foo"
| | 320533 [avdi@av i. r] I've never found that syntax clear or natural, despite doing it for
| + 320537 [jballanc@gm ] If you haven't yet, look at MiniTest. It claims to be a foundation for
| | 320630 [erik@ho le s] It's kind of misleading. Many of the assertions he uses in the
| | 320643 [james@gr yp ] Doesn't miniunit come with minispec?  Besides, even the RSpec team has
| | 320677 [erik@ho le s] Correct, I forgot about that, as personally I never use it.
| + 320541 [gethemant@gm] I have been using test/spec for same thing. What advantages shoulda
+ 320512 [james@gr yp ] James Edward Gray II
| + 320524 [bill.walton@] Thanks for the link, James.
| + 320575 [kbloom@gm il] I've read that before. Can anyone defend rspec against that attack? What
|   + 320584 [james@gr yp ] I think RSpec does some things well.
|   + 320678 [avdi@av i. r] BDD is, as you've identified, just testing with a slightly different
|     320691 [gaspard@te i] Depending on what I am doing, I start by writing the end-user
+ 320519 [wbsurfver@gm] I wasn't crazy about what I had read about rspec, but then the
+ 320644 [gaspard@te i] There are 1360 tests in zena. I have a post about why we do not use

ActiveRecord user
320487 [angico@an ic] ...
320489 [peter@ru yr ] ...
+ 320490 [pilz@os -d .] r4ilz0rz r0ckZ! -.-
| 320494 [angico@an ic] Well, I am not using Rails. I just want to use ActiveRecord with an
| 320496 [peter@ru yr ] ...
+ 320491 [angico@an ic] require 'rubygems'
  320495 [peter@ru yr ] ...
  320497 [angico@an ic] class Tbl < ActiveRecord::Base ; end
  320499 [angico@an ic] The problem was with key "user". The correct would be "username". Now it works fine!
  320503 [saji@ap c2 .] Also while on it, you may want to check out sequel.rubyforge.org

vayama
320488 [vpalking@gm ] <a href="http://www.tkqlhce.com/click-3234803-10534371" target="_top">

Hartford Ruby Group November meeting: 11/24
320498 [danbernier@g] The November meeting is this Monday, 6-8 PM.
321080 [danbernier@g] Thanks to everyone who came out last night.  Even though Flinn's live

Should is the new Must?
320500 [transfire@gm] Why did 'should' become the going nomenclature of BDD framworks?
+ 320506 [charles.nutt] I agree. I've suggested the classic requirement-docs' "shall" in the
| + 320511 [einarmagnus@] But you are setting up an expectation, right?
| | + 320517 [tcrawley@gm ] Announcing yet another test framework: Musty!
| | + 320684 [dchelimsky@g] , I
| |   320715 [transfire@gm] Thanks. This thread has been even more fruitful than I expected. I
| + 320536 [ara.t.howard] should makes sense from a 'write the tests first' perspective.  still
+ 320510 [stephen.celi] Perhaps because even we programmers are fallible, and it softens the
| 320515 [charles.nutt] How about something a bit more threatening...
| + 320521 [pbrannan@at ] well.daggum do
| | + 320526 [charles.nutt] Maybe we could get really fuzzy with it...
| | + 320654 [raasdnil@gm ] ...
| + 320540 [jballanc@gm ] Thanks for the coffee all over my desk via my nose!
+ 320531 [djberg96@gm ] Dunno. Don't care. I don't feel the need for DSL-y notation in my
| 320534 [ara.t.howard] i'm with you dan - the fact that 'should' somehow produces better code
| 320562 [djberg96@gm ] =A0
| 320577 [ara.t.howard] you mean as opposed to reading the *actual* spec right?  (aka the
| 320579 [djberg96@gm ] Who are these PM's who can read code? ;)
| 320679 [avdi@av i. r] It's called FIT[1], or, in the Ruby world, Cucumber[2] (successor to
| 320682 [djberg96@gm ] Aha, thanks! I saw Brandon Keeper's talk[1] on Cucumber at the Great
+ 320680 [avdi@av i. r] Because that's the word PMs and clients typically use when they are

Active Directory and Ruby
320504 [brgsousa@gm ] I want retrieve a list of all users from a Active Directory. How can I
320507 [stephen.celi] Stephen
320516 [brgsousa@gm ] gem install activedirectory
+ 320518 [brgsousa@gm ] ruby --version
+ 320530 [aldric@tr vo] net-ldap worked very well for me.
| 320674 [brgsousa@gm ] Thanks a lot, that was perfect.
+ 320585 [halostatue@g] You forgot to require 'activedirectory'.

selected field assignment
320513 [Bil.Kleb@gm ] I'm grabbing the owner and file names from `find . -perm -g+r -ls`
+ 320528 [tim.pease@gm] class LsInfo <
+ 320546 [diogoslisboa] owner, file = string.split.values_at(4, -1)
| 320671 [Bil.Kleb@gm ] Perfect!
+ 320554 [ara.t.howard] given that you have an array, and fields, you could use arrayfields ;-)
+ 320591 [jeremy@hi eg] How about this crazy method if you have a find(1) which has -printf.
+ 320595 [david_v_wrig] looks like you got several possible suggestions.
  320672 [Bil.Kleb@gm ] I tried that route, see

Ruby session @ P2P Conference in Bulgaria
320529 [bogomil.shop] We are planning Ruby session at our event. If you want to become a

simple way to duplicate vba's InputBox, Msgbox?
320543 [phillipricha] I've always used VBScript to write the simple scripts I
+ 320544 [einarmagnus@] www.shoooes.net
+ 320545 [mark@th ma z] Shoes (http://shoooes.net/) is a simple GUI toolkit and probably what
+ 320578 [reid.thompso] ...
+ 320580 [reid.thompso] ...
+ 320582 [david.mullet] The result is very similar to VB's MsgBox function.
+ 320593 [phillipricha] I now have a simple message_box "function"

[ANN] Library for writing ODF files
320547 [thiago.arrai] Last week I needed to generate a report in the format of an ODF spreadsheet and
320581 [saji@ap c2 .] Wonderful news! Look forward to being able to write other ODF documents
+ 320605 [flo@an er gr] By the way,
+ 320727 [thiago.arrai] Spreadsheets are enough for me for the time being. As I said, I was

Meet Singles From All Over The World .. FOR FREE !!
320548 [hazemmohamed] Meet Singles In Your Area

Avoiding / handling a method_missing call
320550 [aldric@tr vo] I'm trying to retrieve some data from Active Directory
320558 [nefigah@gm i] Well, if nothing else, instead of copy-pasting the method_missing from
320586 [aldric@tr vo] Okay, so ..

Syntax question from a newbie to Ruby
320553 [davidspitzer] I am just learning Ruby and I can not seem to see why the first example
+ 320555 [davidspitzer] puts 'Hello what is you\'re Favorite Number?'
| 320572 [matt@mo s. a] puts <<EOT
+ 320557 [jwkenne@at g] Well, there's your /first/ syntax error.
  320559 [davidspitzer] puts 'I think ' + (number.to_i + 1).to_s + ' may be a better favorite
  + 320570 [Mike Austin ] $stdout << "I think " << number + 1 << " may be a better favorite\n"
  | 320571 [botp@de mo t] # $stdout << "I think " << number + 1 << " may be a better favorite\n"
  | 320782 [gregory.t.br] With the exception that this method returns an array, there is no
  + 320598 [shortcutter@] I'd rather do
    320777 [michael.tome] I think you can skip the .to_i when the number is inside #{}. In other
    320835 [shortcutter@] No.  Whether you can skip to_i solely depends on the type of "number".
    320856 [michael.tome] Yes, you're completely right. I forgot he grabbed the variable from

Ever heared of XRuby before?
320561 [robert.dober] I just stumbled above XRuby http://xruby.com/default.aspx.
320574 [jan.h.xie@gm] XRuby was started by yawl and continued by dreamhead at about the same
320594 [charles.nutt] This is basically true. JRuby's compiler was not actually completed and
320664 [robert.dober] un
320673 [charles.nutt] XRuby is really far behind in supporting all of the more unusual

ruby global regex question.
320566 [just_a_techi] For the life of me, i can't figure out a ruby equivalent to perl's /g
+ 320567 [alan.wayne.j] ...
| 320592 [einarmagnus@] That is pretty much how, except globals are hardly thread safe I
| 320600 [shortcutter@] $1 and the like are
+ 320573 [peter@ru yr ] ...
+ 320587 [mark@th ma z] Would fast be a plus? No nested loop?
+ 320638 [ruby@gm il c] class Regexp

Shoes and double buffering
320576 [theyojimbo@g] Hey,

Is there a way to know what are the subclasses of a given class ?
320607 [sandro.pagan] ...
320608 [sandro.pagan] ...
320610 [peter@ru yr ] ...
+ 320614 [sandro.pagan] ...
+ 320616 [jgabrielygal] As has been mentioned, in your example B and C are not subclasses of A.
  320621 [m.fellinger@] class A
  320624 [jgabrielygal] Yep, much cleaner :-).

"rescue  Postgres::PGError" not working
320609 [mbaruah@sp k] I am trying to rescue exceptions from a PostgreSQL query (see bellow
+ 320615 [b.candler@po] The exception you are rescuing is not the one you actualyl got. Here the
+ 320618 [erik@ho le s] I'm fairly certain (unless it's changed, then I have some code to push)
  320637 [mbaruah@sp k] I did try only with PGError, but that too does not work. I was following
  320646 [b.candler@po] puts e.class.ancestors.inspect should give you a list of possible
threads.html
top