191479-201010

191184-305621 subjects 191639-199672

[ANN] Phoenix Ruby Users Group, and Desert Code Camp
191479 [james_b@ne r] Big Fun in the Valley of the Sun

test/unit : params order in assert_equal
191482 [vshepelev@im] assert_equal variable_to_test, 'value expected'
+ 191486 [drbrain@se m] expected always comes first for all the assertions.
+ 191495 [vshepelev@im] [Some very long calculation of x]
  193194 [bpettichord@] assert_equal seems backwards to native english speakers, too. use rspec

Big Work Loads & Concurrency
191483 [amillionhitp] I am just learning Ruby and planning a to use it for a network
+ 191497 [shortcutter@] with these amount of tasks it's inefficient to have a thread per
+ 191503 [garbagecat10] ...
  + 191536 [amillionhitp] Thanks guys.  I'll look into both of these suggestions.  I really
  + 191548 [amillionhitp] Francis,
    + 191559 [garbagecat10] ...
    | 191585 [amillionhitp] Excellent!  It sounds like EventMachine may do exactly what I'm needing.
    | 191593 [garbagecat10] ...
    + 191568 [garbagecat10] ...

win32ole and activex
191487 [johan.duflos] ...
191516 [joiey.seeley] ...

[ANN] IMAPCleanse-1.1.0
191488 [drbrain@se m] Now with imap_flag!

mysql probem on windows box
191489 [mirek.rusin@] - freshly installed windows xp en with sp2, updated.
191591 [mirek.rusin@] you need to get this dll stupid! :D the best way is to use

[ANN] rcov 0.3.0 (code coverage tool): happier Rails
191492 [ mfp@ac .o g] Source code, additional information, screenshots... available at

Why?
191493 [david.a.boyd] ...

dRuby connection refused between two different machines
191498 [geert.fannes] passing DRbUndumped-objects from a client machine to a DIFFERENT server and
+ 191506 [rossrt@ro co] 1) Are the proper ports open on both machines? Is the firewall setup
| 191597 [Geert.Fannes] ...
| 191661 [pit@ca it in] Geert, I'm no DRb specialist, but I think in your case the server needs
+ 191507 [cribbsj@oa w] I had a similar problem about 6 months ago and ... crap!  I can't
| 191594 [Geert.Fannes] ...
+ 191565 [drbrain@se m] You're telling the client to connect back to the local machine.
  191592 [Geert.Fannes] ...
  191607 [drbrain@se m] In the future please give exactly the code that is broken.

[QUIZ] Bracket Packing (#78)
191500 [james@gr yp ] 1.  Please do not post any solutions or spoiler discussion for this quiz until
+ 191509 [gdey@ma .c m] Have a question,
| + 191513 [Stuart.Holde] Quick question about the phrase 'occasionally missing off a bracket'. Is
| | 191518 [rossrt@ro co] Good point. Let's assume just one bracket will be missing, if any.
| | 191520 [st103@do .i ] Surely that isn't possible, some combinations could have more than one possible
| | 191522 [rossrt@ro co] Either of the above is valid - the main object of this is just to make
| | 191598 [mental@ry ia] Hmm, to clarify, brackets can have non-bracket siblings?
| | 191617 [rossrt@ro co] It's technically allowed in the output, but would never occur in a
| + 191517 [rossrt@ro co] Hmm... How about this: [(BB)] isn't an error, but [(B)(B)] is better. As
+ 191734 [pergesu@gm i] Do the brackets have to have a parent wrapper?
| 191735 [gdey@ma .c m] Also do they have to have a wrapper at all? I assumed they did not
| 191740 [logancapaldo] Why are you even sending them to the packer then, if they aren't
| 191746 [gdey@ma .c m] This is true. I think I made the assumption as a simplification. When
| 191790 [rossrt@ro co] I don't think an outer wrapper should be required, and both BB and
+ 191785 [sander.land@] Here is my solution.
| 191804 [home@ke ry u] This is my first attempt at the Ruby Quiz, and I'm new to the
| 191812 [louis.j.scor] #!/usr/bin/env ruby
| 191814 [logancapaldo] Here's my solution, it's pretty bad as it doesn't fix anything, but I
+ 191799 [alexandru@gl] Here's my solution. I tried to make the most compact solution
+ 191851 [taschini.mli] ...
| 191875 [rossrt@ro co] Guys,
+ 191884 [james@gr yp ] Here's my solution for checking outputs.
+ 191980 [ruby-talk@fj] ...
  191987 [Stuart.Holde] Here is my attempt. Go easy... my first quiz entry, and my first Ruby
  192035 [Stuart.Holde] ...
  192216 [ed.howland@g] #!/usr/bin/env ruby
  192219 [ed.howland@g] Hmm, after reading the comments, I realized I missed an important

Newbie question
191502 [kalons@ya oo] Given an array like
+ 191504 [shortcutter@] You can use select or inject. However it's not clear to me what you
+ 191505 [james@gr yp ] => ["&abc", "a&cb", "b&ac"]
  191584 [kalons@ya oo] That's not quite it.  That seems to match all strings containing an
  + 191588 [james@gr yp ] No letters are duplicated in "&Edit".
  | 191600 [matthew.moss] What he's saying is that he wants both "&Edit" and "Vi&ew" to show up
  | 191602 [matthew.moss] x = ["&Edit", "P&roject", "Noamp", "Vi&ew", "S&ample", "T&ree"]
  + 191595 [alex@bl ck e] keys = {}
  + 191605 [shortcutter@] By your definition "a&cb" does not belong into the result set.

comparing objects
191523 [r.mark.volkm] Comparing objects in Ruby can be a little confusing. Let me know if
191609 [shortcutter@] This is called "equivalence".
191611 [logancapaldo] Based on this I would amend your explanation with
191612 [shortcutter@] I'd leave it at "equivalence" for == and eql? because for most types
191614 [r.mark.volkm] So why is it useful to have both == and eql?
191619 [logancapaldo] Well the post that sparked my response and "clarification" is one
191666 [minkoo.seo@g] ...

Ruby community website / forum
191524 [eliben@gm il] Coming from Perl, what I miss in Ruby the most is (surprise !) not CPAN,
+ 191527 [mike@st k. a] I second your opinion of Perlmonks, a fine site with a good signal to
+ 191528 [halostatue@g] I haven't spent much time at Perlmonks, but I hate visiting there whensomeone points out something "interesting." It's almost as bad as LtU.
| 191680 [m4@po it .s ] I second that. Most email clients I come across aren't smart enough to
| + 191681 [charlie@ca t] ...
| + 191699 [leslieviljoe] I "third" that. Gmail is great - just create a filter which keeps all
|   191710 [jmg3000@gm i] Gmail is great for what it is, but I think the OP was looking for
|   + 191743 [louis.j.scor] I think he was lamenting the fact that there is no way to get a
|   | + 191794 [leslieviljoe] Don't know what you mean, Gmail put the whole Sharp Knives and Glue
|   | | 191803 [louis.j.scor] No, don't get me wrong.  I think gmail is great for what it is, and as
|   | + 192819 [halostatue@g] Odd. I've never had a problem with gmail, and I've used a *lot* of
|   + 192817 [halostatue@g] I see no value in this.
|     192828 [jmg3000@gm i] No one said RubyGarden couldn't be that site, but AFAICT there's no
|     192832 [halostatue@g] This is a good thing. Forums are the lowest denominator of quality,
|     192861 [jmg3000@gm i] Me too.
|     + 192865 [halostatue@g] Great. Just what we need. Karma whores. Colour me even *less* interested
|     + 192866 [tanner.burso] ...
|       192889 [jmg3000@gm i] I guess so. Though I don't think many folks do that. My impression was
|       192896 [halostatue@g] This will be fixed in the next week or two. Jim Weirich has written a
|       192900 [jmg3000@gm i] *BOOM*
+ 191558 [jesusrubsyou] I agree that having a single place to look keeps things simple and
+ 191642 [jmg3000@gm i] Ok, ok. I've heard enough... You're hired! :)
  + 191646 [eliben@gm il] For starters, the software that powers Perlmonks itself can be used. It
  | 191687 [jmg3000@gm i] Well, places like perlmonks have a lot of content there besides just
  | 191689 [eliben@gm il] By borrowing from Perlmonks I didn't mean the content, but the code.
  | 191690 [jmg3000@gm i] Right. But what I was getting at was, once you've got a body of
  + 192894 [gilesb@gm il] phpBB is the work of the devil.
    192898 [jmg3000@gm i] Perlmonks == ruby-talk (via Gmail perhaps) + Ruby FAQ + Ruby wiki

accessing mysql thorugh ruby
191526 [bfsog@ho ma ] [code]
191529 [simon.kroege] cheers

snmp gem
191530 [ro@pa er mi ] I am not sure what is wrong.  "gem install snmp" seems to report success.
191532 [ara.t.howard] require 'rubygems'
191537 [ro@pa er mi ] Thanks Ara!  Typing "SNMP.methods" in irb seems to give
+ 191542 [logancapaldo] If the docs were to change, it should be to the following, not what
+ 191544 [ara.t.howard] nope.  this is the 'fault' of rubygems and has nothing to do with snmp.  all
+ 191553 [halostatue@g] No. You want  require 'rubygems'  require 'snmp'

win32ole - wait for action to complete
191533 [rich.hall@sb] I have a script driving a proprietary Powerbuilder application via
191554 [johnatl@ma .] You could use WinBatch http://winbatch.com for this.
191562 [rich.hall@sb] Thanks. I'm trying to avoid using software I'll have to license (part of

Ruby 2.0: Symbol uniqueness?
191540 [mental@ry ia] p "!".intern == "!@".intern # => true
+ 191545 [jgbailey@gm ] ...
+ 191877 [chneukirchen] +1
+ 192391 [polyergic@gm] ...

CSV::IllegalFormatError   (Need to club data entry person)
191547 [smc7000@gm i] I'm using csv module to read parse 76,000 rows of patient data in a CSV
+ 191550 [u.alberton@g] It's just a guess, but maybe you could try replacing every
| 201009 [smc7000@gm i] Bira, I'm testing your idea with the below script but I'm having
| 201010 [Nuralanur@ao] ...
+ 191572 [james@gr yp ] Well, the long and the short of this story is that the above line is
+ 191616 [dave@bu t. d] gsub('"B"', '""B""')

Finding an interval in a sorted array?
191555 [Bil.Kleb@na ] Surely there is a way to find an interval in a sorted array
+ 191573 [gm.vlkv@gm i] class Array
| 192178 [Bil.Kleb@na ] My officemate prompted this question.  Here's his
+ 191575 [ara.t.howard] this ought to get you going
| 191577 [Daniel.Berge] class Array
+ 191601 [shortcutter@] module Enumerable
  191603 [shortcutter@] module Enumerable

Noob Question - String Manipulation...
191556 [joe.cairns@g] Hey, I'm pretty new to Ruby and am trying to absorb the "ruby way" of
+ 191563 [jmichaels@gm] I don't know of any libraries offhand that can do this (CGI only has
| + 191567 [ruby-talk@fj] ...
| + 191571 [jesusrubsyou] gsubbing breaks down for more complex test cases, such as things
+ 191574 [rossrt@ro co] There's more to this than meets the eye - it's often best to hand off

Help with ActiveRecord
191560 [pjhyett@gm i] class AdminQueue < ActiveRecord::Base
+ 191561 [pjhyett@gm i] Sorry guys, I meant to post this in the Rails mailing list.
+ 191564 [dave@pl yg a] Any field named 'type' is special in Rails, it enables single table
  191590 [pjhyett@gm i] Thanks Dave, I had a naming conflict just yesterday as well, I really

Question on self (Newbie)
191576 [darushin@gm ] I am working my way through some tutorials and books on Ruby and i am
+ 191580 [u.alberton@g] In your example, declaring "login" as "self.login" means it's a class
| 191586 [darushin@gm ] Thanks for the clarification, it really helps clear things up.
+ 191582 [logancapaldo] Here, self refers to the class
+ 191583 [work@as le m] If by "the function" you mean "def self.login" it's to make it a
| 191587 [darushin@gm ] Thank you for supplying a example, It makes things even more clear then
+ 191589 [khaines@en g] class Foo

[ANN] Nitro + Og 0.30.0: VCR mode, Og QBE, Feeds, Fixes
191578 [george.mosch] Dear devs,
+ 191596 [khaines@en g] Now THAT is a great idea.  Imitation is the sincerest form of flattery and
| 191852 [george.mosch] Glad you like it ;-)
+ 191657 [kashia.buch@] George, you have a bad link there, please update your bookmarks.
| 191685 [robmnl@gm il] ...
+ 191718 [pollak@gm il] ...

Extending Core Classes - Best Practices
191579 [jesusrubsyou] I've been following the "Sharp knives and glue" thread.  It's gotten me
191606 [shortcutter@] What exactly do you intend to achieve with ".respond_to? '>'"?
191608 [logancapaldo] I think he's trying to make sure the result is a number and therefore
+ 191626 [louis.j.scor] #!/usr/bin/env ruby
| 191721 [sroberts@un ] This pattern could help in some cases, but doesn't address a number of
| 191744 [louis.j.scor] Why can't you wrap the string after you get it?
+ 191754 [jesusrubsyou] Thanks for the tips about Regexp#===, guys.
  191759 [louis.j.scor] Honestly, that's a little childish, don't you think?  You supposedly
  191796 [jesusrubsyou] If there are sensible restrictions that exist with good reason, I am
  191802 [louis.j.scor] Yes, I think that's probably the biggest problem.  The other main
  191811 [jesusrubsyou] Hm, okay.  I think I'll keep living a bit dangerously in this regard,
  + 191813 [louis.j.scor] I agree.  I think it is a reasonable expectation for a string to tell
  + 192228 [not_real@ex ] Just 2 cents here...

adwords4: access the Google Adwords API in ruby
191599 [chanezon@gm ] ...
+ 191895 [me@ja on li ] Because RubyGems is a solution to a problem that you only have when you
| + 191901 [leavengood@g] Please do not try to speak for the entire Ruby community with a
| | 191902 [me@ja on li ] I disagree. RubyGems should only be used on Linux when a package is not
| | 191903 [james@gr yp ] You are welcome to disagree.  You are not welcome to speak for me.
| | + 191906 [logancapaldo] I agree with James. Do they have a similar rant about CPAN? I recall
| | | + 191907 [charlie@ca t] ...
| | | + 191920 [me@ja on li ] That's the only topic of any imporantance here. Applications depend on
| | + 191913 [james_b@ne r] Same here.
| | | 191917 [me@ja on li ] There is no choice available if the package author neglects to include
| | | 191931 [james_b@ne r] Sure there is.  People looking to repackage source code provided as a
| | | 191936 [me@ja on li ] er.
| | + 191918 [me@ja on li ] Was I?
| + 191912 [taschini.mli] Actually, RubyGems is a solution that is independent of the underlying
| | 191926 [me@ja on li ] No, you misread the page, then. It's only more difficult when an author
| + 191916 [james_b@ne r] BTW, not sure if this as been mentioned already (if it has I missed it;
+ 192063 [jp@je fp it ] Not to intrude on the hissy-fit over packaging schemes, but I'm
  192207 [paul@ic no l] Staying on topic? Heresy! :-)
  192218 [jp@je fp it ] So is the ultimate goal here to write something that will analyze the

Ruby-LDAP and leftover connections
191615 [seanhussey@g] I'm using RubyLDAP all over the place in my Rails app.  I'm curious,
+ 191627 [garbagecat10] ...
+ 192829 [ttate@tt ky ] The connection is kept open until the connection object is garbage collected, if you call
  193135 [seanhussey@g] That bit about the block is a huge and powerful concept.  I learned
  193150 [garbagecat10] Sean, if you have evidence that you are leaking a connection (perhaps
  193174 [seanhussey@g] One possibility may have been related to network configuration changes

Rough idea regarding modification of core classes
191618 [tanner.burso] ...
191638 [drbrain@se m] Ruby does all that with #extend.
191716 [leslieviljoe] This is cool, very similar to the "adding functionality to the strings
191958 [drbrain@se m] Use delegate.rb.

urlgrabber in Ruby
191620 [pgquiles@el ] I'm looking for something like the Python-esque URLGrabber package, but in
191625 [david.mullet] "open-uri" might serve your purposes. It allows you to work with

The simplest way to get 1.9 sources?
191629 [vshepelev@im] What is the simplest way to get 1.9 sources? I've already downloaded
191630 [vjoel@pa h. ] vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
191632 [vshepelev@im] Thanks, Joel.

Considering Ruby For a Networking Application
191635 [james@gr yp ] I'm going to be working on a fairly basic networking application
+ 191637 [halostatue@g] James, you might want to look for "EventMachine".
| 191701 [james@gr yp ] This is a terrific find.  Thank you so much!
+ 191640 [jlsysinc@al ] I haven't noticed any difference between 1.8.3 and 1.8.4.
| + 191643 [billk@ct .c ] If nonblocking works on Windows, it's a post-1.8.2 development...
| + 191703 [james@gr yp ] Yeah, this is pretty much how I did it in Perl.  Thank you from the
+ 191641 [billk@ct .c ] I'm sorry I don't have definitive answers.  I'm going to
| + 191702 [james@gr yp ] Thank you for the very detailed breakdown.  It was quite helpful.
| + 191909 [garbagecat10] ...
|   191923 [james@gr yp ] But then a large write could still block the entire process, since
|   + 191932 [garbagecat10] ...
|   | + 191937 [james@gr yp ] Forgive me if this is answered in the documentation, I have had time
|   | | 191943 [garbagecat10] ...
|   | | 191945 [james@gr yp ] So my callbacks need to return reasonably quickly right?  So
|   | | 191988 [garbagecat10] ...
|   | | 191995 [james@gr yp ] I personally am fine with the current implementation.  Seems like a
|   | | 191996 [garbagecat10] ...
|   | + 192310 [sroberts@un ] Stevens describes this problem, but I thought he also described the fix,
|   |   192312 [garbagecat10] ...
|   |   192954 [sroberts@un ] I think it was in the contex of ruby's socket apis not behaving as
|   + 191977 [billk@ct .c ] ...
|     + 191984 [james@gr yp ] This is some awesome information.  Thanks Bill!
|     + 191989 [garbagecat10] ...
|       191990 [billk@ct .c ] Right, except that in win32/win32.c, ruby corrects microsoft's
|       + 191992 [garbagecat10] ...
|       | 191998 [billk@ct .c ] No; the only exception I ever saw raised was EOFError from the
|       | + 192000 [garbagecat10] ...
|       | + 192006 [akr@m1 n. rg] I modified the document of readpartial.
|       |   192008 [billk@ct .c ] Ah - OK, thanks!
|       |   192010 [akr@m1 n. rg] As far as I know, matz found the inconsistency in
|       |   192016 [gilesb@gm il] Francis -- just out of curiousity -- is the Reactor model in
|       |   + 192036 [garbagecat10] ...
|       |   + 192037 [garbagecat10] ...
|       + 191994 [garbagecat10] ...
+ 191938 [garbagecat10] ...
  191941 [james@gr yp ] I'm writing a server.
threads.html
top