234804-236863 subjects 235196-366168

Re: Number Spiral (#109)
234950 [w_a_x_man@ya] This is more obfuscated than
235111 [SimonKroeger] depends on your line end character(s) :)
235158 [w_a_x_man@ya] Only if you're under windoze and you neglect to remove

Minor Change Proposal for Classe 'UnboundMethod'
234961 [wonado@do ne] Minor Change Proposal for Classe 'UnboundMethod'

Declaring instance variables dynamically
234962 [aas11@du e. ] Coming from PHP I want to take a class say,
+ 234965 [ryand-ruby@z] ri OpenStruct
| 234971 [tim.pease@gm] To elucidate a little more, OpenStruct is a great class that does what
+ 234978 [gwtmp01@ma .] It is a bit hard to sort out what you are really after because your
+ 234988 [aas11@du e. ] Thanks for the feedback.  I am in fact trying to do what openstrtuct
  + 234999 [gwtmp01@ma .] Well, it is certainly possible to roll your own class that
  | 235002 [james@gr yp ] It's called OpenStruct and it is included in Ruby's standard library.
  | 235005 [gwtmp01@ma .] The original poster wanted the setters and getters mapped to instance
  + 235028 [ssmoot@gm il] => nil

what's wrong with this snippet ...
234974 [koflerjim@ma] I've just stumbled over this orphaned snippet on my hard drive that
234977 [vincent.four] This creates an instance method and not a class method. Consider using
234980 [koflerjim@ma] Thanks, Vince!

TrueClass === TrueClass
234982 [lists@mi el ] TrueClass === TrueClass # false
234987 [vincent.four] === returns true with one class if you 'compare' it to an instance of
+ 234993 [dchelimsky@g] Ah - so Object === Object returns true because the second Object is an
| 235121 [robert.dober] ...
| 235152 [dchelimsky@g] ...
| 235231 [robert.dober] ...
+ 235001 [lists@mi el ] Thanx Vince, just what I looked for.

Negative Float conversion to Fixnum
234990 [public@gm il] I'm sure this has been hashed out somewhere on the list before, but
+ 234995 [wonado@do ne] irb(main):001:0> 3930-39.30*100
+ 235011 [wonado@do ne] If you always expect a result for which "x * 100" is a number without a

Conventions for project organization?
234996 [gregory.t.br] I'm going to writing a short blog entry for the O'Reilly blog about
+ 235000 [james@gr yp ] Probably want a better explanation there.
| 235067 [gregory.t.br] Right, that's a good point.   Often i've organized code so that ts_all
| 235093 [drbrain@se m] I never organize into "suites".  All my tests are capable of running
| 235125 [gregory.t.br] Yeah, this is the case for me too since I use autotest.  However, Eric
| 235127 [gregory.t.br] By the way, if it wasn't clear, in some of my projects I use the ts_*
+ 235070 [ snk@gn .o g] These patterns seem to have less effect on BDD (with rSpec), where there
| 235077 [gregory.t.br] This is good advice, especially for use with rspec.  I'm mostly
+ 235090 [alex@bl ck e] It may be a bad habit I've picked up from Rails, but for a lot of my

235006 [bitdoger2@ya] i've got a whole file to scan...but can't get neatly get the last
235014 [wonado@do ne] Hope there is one solution O.K. for you.
235452 [bitdoger2@ya] ...wow...thanx..a whole lot..dave

Looking for Game Dev IRC channels/mailing lists/forums
235008 [h4lfl1ng@in ] I recently started using Gosu with ruby, And I'm working on a 1:1 isometric

I don't get rspec
235013 [dorrenchen@g] I just discovered rspec today, reading the example and tutorials,
+ 235021 [james.britt@] There is a  good Google video about rspec and Behavior Driven
| 235035 [dorrenchen@g] I still fail to see the value added by rSpec. In the video, one main
| + 235039 [ssmoot@gm il] It's not. If you're doing TDD right, then BDD is just what you're doing
| | + 235058 [james@gr yp ] Yes.  This has always bothered me about the zentest tool.  I love
| | | 235787 [joevandyk@gm] What's wrong with zentest, specifically?
| | | 235789 [james@gr yp ] You will probably understand better by watching the movie, but
| | | 235793 [drbrain@se m] Which will match up 1:1 if you factor your code well.
| | | + 235794 [pergesu@gm i] The point is that you shouldn't try to shoehorn your tests into this
| | | | 235798 [drbrain@se m] Shoehorning is design smell, so I refactor.  The 1:1 falls out
| | | | 235806 [twifkak@co c] Each one of these test methods invokes multiple methods on Stack. You're
| | | + 235813 [dchelimsky@g] Eric,
| | |   235837 [drbrain@se m] I don't really care if people use zentest or autotest or unit_diff or
| | |   235866 [dchelimsky@g] Hear, hear!
| | + 235071 [Gennady.Byst] ...
| + 235042 [lionel-subsc] assert_equal is ambiguous and as said in the video, many mismatch the
| | 235051 [dorrenchen@g] Each context in rSpec is just a new testcase. For example,
| + 235380 [dchelimsky@g] You may not now, but if you have to maintain your app over a long
+ 235083 [pergesu@gm i] First of all, it's just a simple example for people brand new to
+ 235377 [dchelimsky@g] bias that might bring.
+ 235492 [chneukirchen] I don't know about you, but since I use test/spec[1] (my Test::Unit
+ 235520 [nightphotos@] I don't look at this as "add a test to the spec/add a trivial fix to
| + 235766 [jim@we ri hh] It's easy for folk to dismiss RSpec by saying that it's just semantics
| + 235773 [jim@we ri hh] When I do TDD, I approach it with a Jeckle and Hyde perspective.  When I
|   235782 [dchelimsky@g] With me it's more like Abbott and Costello!
+ 256907 [Chris.Meliki] The idea behind doing small steps is that you know exactly what went wrong
  257198 [rick.denatal] Actually I believe that the pure process of
  257203 [dchelimsky@g] The reason that we want to see the test fail is so that we can
  260658 [rick.denatal] Better late than never. Yes
  260660 [dchelimsky@g] Thanks

Float to Fixnum (was: Negative Float conversion to Fixnum)
235015 [aaraines@gm ] When I think of rounding error, I think of lost precision due to
+ 235016 [ara.t.howard] no.  check out
+ 235036 [gwtmp01@ma .] Because 39.30 is a base 10 representation of a number and there
+ 235068 [botp@de mo t] #--------------------------------------
+ 235079 [w_a_x_man@ya] Almost all programming languages use binary floating point, so 0.30

Bug in Ruby with adding strings?
235017 [tester.paul@] I just found what looks like a bug in Ruby 184-20. (I haven't tried it
235018 [dflanagan@gm] I suspect that having no space after the + makes Ruby think it is a
235088 [shortcutter@] I think it's trying to parse as
235146 [tester.paul@] I originally came across this when I was trying to assign something
+ 235234 [shortcutter@] irb(main):001:0> a = 1,2,3
| 235494 [tester.paul@] Thanks for the feedback Robert.  I didn't know Ruby could do that.
+ 235500 [gregory.t.br] it may be parsing as 'foo' + x.to_s(+'bar') since to_s can sometimes
  235505 [wonado@do ne] This makes sense. When translating the infix notation to method usage (don't

Acts_as_taggable (the gem) woes (solved)
235019 [jean.helou@g] I had to battle quite a bit to find how to load acts_as_taggable
235027 [jean.helou@g] Dammit!

FuseFS-version of cheat
235023 [judofyr@gm i] I don't know if it's done before, but today I created a nice script

the elusive rubyweaver dreamweaver extension
235024 [mcyi2mr3@go ] Does anyone know where i can get hold of this much vaunted rubyweaver
235026 [mcyi2mr3@go ] found it!

YAML::Syck fault tolerance
235029 [phlip2005@NO] I need to read a block of YAML and recover gracefully if it fails. The
235237 [jan.svitok@g] Not tested idea: If the exception contains error position, try cutting
235279 [phlipcpp@ya ] That's what I hacked-in shortly after posting. The actual bug was something

[Offtopic] Learning Japanese
235031 [gerardo.sant] Thanks to Ruby I've learned a lot recently about programming languages
+ 235038 [greg.pederso] ...
| 235049 [james@gr yp ] I use the Rosetta Stone, for Japanese, and love it.
| 235054 [greg.pederso] ...
+ 235044 [ruby.hardwar] What would you recommend?
+ 235069 [h4lfl1ng@in ] Some good resources are podcasts. Here are some of the things I use.
+ 235332 [gerardo.sant] Thank you everybody for your help. Hope to be able to thank you again
+ 235381 [rubyzbibd@ub] < Snip >
+ 235413 [threeeyedfis] Good day!

Errors in mysql + ruby connection
235043 [acmw@di mo d] After getting my installation worked out, I'm having an error in my test

"postgres" module needs work, author gone, patch included
235046 [ruby@j- av s] ...
+ 235057 [djberg96@gm ] I talked to Dave Lee a while back and he indicated to me that a new
| 235075 [ruby@j- av s] Please let me know if you get more information from Dave Lee.
+ 235061 [tom@in oe he] I use it with PostgreSQL 8.2 and I've been pretty happy with it.
+ 235156 [jason@in el ] I use postgres on openbsd and netbsd without incident, but recently got
  235170 [ruby@j- av s] (1) Test my patch against the snapshot version available from the
  235178 [jason@in el ] project, and offers a snapshot dated 2005.12.21.
  235188 [jason@in el ] Find attatched a diff that applies cleanly to the 2006.04.06 source.

Re: "postgres" module needs work, author gone, patch include
235047 [shevegen@li ] Actually I tried to use it but somehow I didnt even finished compiling.
235073 [ruby@j- av s] Ouch, you avoided postgresql because the ruby driver was that bad?
235187 [kevwil@gm il] I use the postgres driver everywhere - Windows, Linux, Mac, production,
235195 [jason@in el ] Ha. I've never come across that before, but indeed that is what happened

ERROR: Failed to build gem native extension
235048 [greg.pederso] ...
235050 [TimHunter@nc] To install RMagick on Windows, use the rmagick-win32 gem. See
235052 [greg.pederso] ...
235060 [TimHunter@nc] Partly. The "rmagick" gem includes the source code for RMagick. It

Looking for Rails/OWL,RDF,RDFS speaker
235053 [kathryn2006@] ...

Re: Learning Japanese
235063 [ snk@gn .o g] I just watched lots and lots of Japanese anime with English subtitles.
235632 [dan-ml@da 42] I did that too but now all my Japanese friends tell me I speak like an

Call for developers: Alexandria project
235074 [tristil@gm i] The Alexandria project (http://alexandria.rubyforge.org/), a project

flat file database for ruby?
235078 [beingthexemp] Does anyone know of any flat file database implementations for Ruby?
+ 235094 [shortcutter@] There is a ton of options, at least Marshal, Yaml, PStore, CSV.  What
| 235097 [eweaver.spam] Don't forget KirbyBase.
+ 235098 [hhausman@gm ] The same author started another project with similar functionality,
  235107 [khaines@en g] Mongoose.

Re: stub implementations in TDD (was: I don't get rspec)
235080 [twifkak@co c] It seems to be part of Kent Beck's definition of TDD. AFAICT, he excuses
235376 [dchelimsky@g] There's a point that Kent makes I'm not seeing in your description.

problem in win32-service ... or ... what ?
235081 [rajib.chakra] I am trying to build an windows service ( WIN XP SP-2) using the
235103 [djberg96@gm ] Is there anything in the log?
235190 [rajib.chakra] Thanks for your reply
235193 [djberg96@gm ] You either install yahootickerpull.rb in ruby sitelibdir, or you modify
235416 [rajib.chakra] Thanks it is working perfectly.

attr_accessor weirdness, or something
235084 [CBlair1986@g] currently using attr_accessor to set up a list of variables that are
+ 235085 [mvette13@gm ] ...
+ 235086 [robert.dober] ...
+ 235087 [w_a_x_man@ya] @timer is an instance variable; timer isn't.
+ 235135 [gavin@re in ] a) Call the method named "timer=" and pass it the value of Time.now, or
  235625 [CBlair1986@g] Thank you, Phrogz! Thinking on it now, it's obvious. Must've had a late

conditional value in hash array ?
235109 [josselin@wa ] hos to have a conditional value  ?  :  :category => domain unless domain.nil?
+ 235113 [wonado@do ne] It doesn't make sense in this situation, because "domain unless domain.nil?"
| 235115 [josselin@wa ] thanks Wolfgang
| 235119 [shortcutter@] What exactly are you trying to achieve?  Is it maybe rather something
| 235129 [josselin@wa ] thanks that's better... forgot the key nme ..
+ 235162 [Gennady.Byst] ...

[ANN] ruby-oci8 1.0.0-rc1
235117 [kubo@ji ba .] ruby-oci8 1.0.0-rc1 is released. This is a Oracle module using OCI8 API.

Proper way to either create or append to an array?
235128 [adam@us .n t] Let's say I want to either create a new named array or append to that
+ 235130 [vincent.four] @foo[:bar] ||= []
+ 235133 [gavin@re in ] ( @foo[:bar] ||= [] ) << "snafu"
+ 235136 [shortcutter@] Since you're using a Hash the block constructor is the most elegant
  235138 [gavin@re in ] To be clear for those unfamiliar with this: any time you ask for the
  + 235143 [Rob@Ag le on] That's only because you're not checking for the presence of a key
  | 235154 [w_a_x_man@ya] irb(main):006:0> ['foo','bar'].include? 'bar'
  + 235157 [w_a_x_man@ya] What if foo[:bar] has been assigned a value of false?

Ruby installation winders PATH issue
235134 [whackencrack] home ed laptop. Everything works ok if I call ruby directly
+ 235236 [ml.chibbs@gm] ...
+ 235247 [djberg96@gm ] By any chance are you using a command shell that was open before you

FreeRIDE - Way too many warnings
235141 [grauenwolf@g] Whenever I start FreeRIDE I get a ton of warnings. It takes a long time
235145 [matt@ke tl w] 1) Don't post the thousands of repeated errors to the list
+ 235159 [grauenwolf@g] You mind telling me who the fx ruby people are and how to contact them?
| 235160 [matt@ke tl w] I must be in a good mood.  Didn't even get laid last night....
| + 235163 [lyle.johnson] What is this "Google," and why have you been keeping it a secret from
| + 235174 [grauenwolf@g] Gee thanks for being ever so helpful. It was so nice of you to almost
|   235175 [matt@ke tl w] Yes, but I saved you from having to type "www.google.com" and then find
+ 235172 [grauenwolf@g] They say its Ruby's fault for putting the bug in v1.8.5 and FreeRide's
  235173 [matt@ke tl w] 1. Fix the bug in ruby and submit patch
  235181 [grauenwolf@g] Let me get this straight. You are telling a newbie with one day of
  235184 [TimHunter@nc] Please accept my apologies, on behalf of the Ruby community, for your
  + 235186 [grauenwolf@g] Thanks, I really appreciate that. It is so hard to find ones way around
  | 235255 [TimHunter@nc] To the best of my knowledge all the components in the 1.8.5 one-click
  + 235191 [matt@ke tl w] There's no need to apologize on anyone's behalf (I'm certainly not
    + 235198 [grauenwolf@g] Tell me something, why do you bother?
    | + 235468 [johan.veenst] ...
    | | 235474 [r.mark.volkm] We really shouldn't get into long threads discussing who was polite
    | | + 235478 [ml.chibbs@gm] ...
    | | + 235479 [ramalho@gm i] Most car accidents involving two vehicles are the fault of both drivers.
    | |   235526 [grauenwolf@g] Luciano, do you have any idea how rude and arrogant you are being right
    | |   235529 [olsonas@gm i] Here's an answer that might actually help you out :)
    | |   235552 [Grauenwolf@g] I appreciate your help, and I'm sure I'll forget this incident in short
    | |   235558 [gwtmp01@ma .] The one-click installer isn't the 'main distribution' for Ruby. It
    | |   235571 [Grauenwolf@g] Then Ruby has a serious perception issue it needs to be addressed. The
    | |   235618 [gwtmp01@ma .] I think you are imagining an organization that doesn't exist with
    | + 235629 [ttmrichter@g] How else is he supposed to prove that his Pretendy-Fun-Time e-penis is
    + 235232 [bwilli@ma li] I pity those that have forgotten (or never knew) the difference between
    + 235240 [gsinclair@gm] I offer my condolences too, Johnathan.  Statistically, you're very
      235477 [ml.chibbs@gm] ...

fxri - Way too many warnings
235142 [grauenwolf@g] Whenever I start fxri I get way too many warnings, easily in the

Net SFTP / Deprec
235161 [pgattphoto@g] I am trying to get deprec gem to work on windows, and I'm told by the
236166 [robin.curry@] I'm stuck on this same issue. Anybody had luck getting this to work, or

[ANN] ograph 0.0.1 Released
235171 [aaron_patter] ograph version 0.0.1 has been released!
235385 [rubyzbibd@ub] This is really cool!  I have a long time love hate relationship with

Implementing a "calcuator" feature
235176 [sonny.chee@g] Hey Guys,
235177 [jtregunna@bl] Why not just write a parser for algebraic expressions?

Hash pairs at?
235180 [transfire@gm] h = { :a=>1, :b=>2, :c=>3 }
+ 235182 [cdcarter@gm ] Check out Day 11
+ 235185 [w_a_x_man@ya] h = { :a,1, :b,2, :c,3 }
+ 235224 [vjoel@pa h. ] h = { :a=>1, :b=>2, :c=>3 }
+ 235228 [robert.dober] ...
| 235229 [robert.dober] ...
+ 235244 [GGarramuno@a] No.
| + 235246 [GGarramuno@a] That being said, Hash DOES seem to be buggy and missing a proper
| | 235249 [dblack@wo bl] It's not incorrect or buggy; that's the way Enumerable#find_all works.
| | 235299 [GGarramuno@a] Sorry, David, but I disagree.  It may not be buggy (as the bugginess is
| | 235301 [vjoel@pa h. ] This does look a bit odd...
| | 235322 [dblack@wo bl] A bit.  The funny thing, though, is that it of course makes it
| | + 235326 [transfire@gm] Avoiding net loss, how about going for gross gain. So how about "fixing
| | | 235461 [aledonne.lis] Maybe I'm late to the party, but instead of select_pair, I'd name the
| | | 235497 [vjoel@pa h. ] It might be in facets, too.
| | | + 235514 [robert.dober] ...
| | | + 235515 [transfire@gm] hmm... in Facets, Hash#slice is just an alias for Hash#values_at.
| | | + 235658 [flori@ni e. ] module HashInclusion
| | + 235667 [kbloom@gm il] No it wouldn't because you could just call .to_a on the returned hash to
| |   235706 [transfire@gm] that's a good point.
| + 235250 [robert.dober] ...
+ 235260 [gavin@re in ] #  h = { :a=>'a', :b=>'b', :c=>'c' }
  235259 [gavin@re in ] Oh, and yes: I'd like a method like this in the core, also. Preferably
  235265 [dblack@wo bl] I'll put in a plug here for flattenx, which lets you flatten by any
  + 235272 [robert.dober] ...
  | 235293 [transfire@gm] I agree. I think #paris_at is easier to quicky comprehend.
  | 235295 [robert.dober] ...
  + 235318 [w_a_x_man@ya] class Array
    235320 [dblack@wo bl] That's the idea, though flattenx lets you do flatten_by(n) and also is
    235342 [gwtmp01@ma .] I didn't see anyone else mention that in Ruby 1.9...
    235345 [dblack@wo bl] Cool!  I actually didn't know that had made it into 1.9.  I look