221835-222795 subjects 222270-224308

Creating a  Schedule-like array
222038 [anthony.gree] Maybe this ? so you represent day segments
222041 [ara.t.howard] -a
222119 [robert.dober] ...

Unit testing questions
222043 [phurley@gm i] I have been working on a msg4r wrapper that provides a number of
222056 [tim.pease@gm] If you have tests that work, why change them?

WMI and WIN32OLE issues
222050 [obc.spike@gm] Having difficulty pulling information from a remote system with Ruby

Ruby fs watcher?
222051 [etienne.dura] is a new file in a given directory, I do something. So, my problem here
+ 222052 [wilsonb@gm i] This is fairly operating-system specific. Which one are you using?
+ 222057 [tim.pease@gm] Take a look at Ara's dirwatch solution. Does exactly what you want.
+ 222058 [thomas.adam2] If you're using Linux, you can use dnotify (and the newer 'anotify'
| 222060 [ssmoot@gm il] You'd used WMI in Windows, potentially through the WIN32OLE library, to
+ 222062 [ara.t.howard] -a
+ 222065 [nospam@no it] This problem is easily solved, and in a portable way. You create a list of
  + 222070 [ara.t.howard] you'd think - until your script stops, restarts, and you re-fire actions for
  | + 222073 [gavin.kistne] I bet others have better systems (I see many replies to your message
  | | 222079 [ara.t.howard] i've used this in the past too (thanks gavin!) - it's good if you don't need
  | + 222078 [nospam@no it] / ...
  |   222081 [ara.t.howard] i guess you're right.  i get defensive at the mere suggestion of simply event
  + 222076 [shortcutter@] You rather need the mtime of the directory and only that - at least if

Ruby Design Principles
222053 [Bil.Kleb@NA ] Matzcast on ITConversations?
222059 [marcel@ve ni] This appears to be the audio of Matz talk at BYU right before RubyConf. The
222064 [Bil.Kleb@NA ] Yes.
+ 222063 [Bil.Kleb@NA ] Oops; the slides are on the colloquia page.
+ 222155 [matz@ru y- a] ...
  222163 [vjoel@pa h. ] Is it really fair to say that the ruby program
  222259 [Reid.Thompso] print line}'
  222302 [vjoel@pa h. ] For that matter, how many machine instructions behind those 50 lines of
  222353 [wilsonb@gm i] I'm writing a DSL to manipulate the spacetime foam directly.
  222403 [znmeb@ce ma ] How do you get the dust mites out of the spacetime foam? I can't use it

Watir - determine order of the controls
222054 [patrick@pk p] I've written a ScreenScraper class that "harvests" all the HTML
222116 [aledonne.lis] I don't think this is a well-defined problem. The order in which
222133 [patrick@pk p] If you're referring to my question, I thought it the problem was defined
+ 222307 [aledonne.lis] Sorry if I was unlear; your description was well-stated, I was saying
+ 222407 [christopher.] I wouldn't be too hasty, there, those controls are going to change over
| 222450 [kohljonathan] Chris has a good point. Furthermore, most modern browsers "fix" HTML,
+ 222433 [christopher.] I wouldn't be too hasty, there, those controls are going to change over

Rubyscript2Exe directory management
222072 [dmorin@gm il] I'd like to use rubyscript2exe to move over a Ruby application and its
222281 [dmorin@gm il] Ok, not really sure what changed on me, but I'm getting different
222642 [erikveen@gm ] It's only possible to use a fixed directory name in %TEMP%. You

modeling a simple cpu
222083 [ara.t.howard] i need to model the on board cpu of a satellite in order to mock running
+ 222094 [gavin.kistne] Not to distract the thread from your very real question, but you do
| + 222098 [robert.dober] ...
| | 222140 [ara.t.howard] great resource!  thanks!
| + 222099 [james@gr yp ] I agree.  ;)
| + 222103 [nospam@no it] The last processor I successfully modeled was the old 6502 (Apple II), since
|   222144 [ara.t.howard] it's for these guys
|   222150 [znmeb@ce ma ] Isn't there an open-source "universal old architecture emulator" package
|   222159 [znmeb@ce ma ] I think I found it ... simh
+ 222107 [djberg96@gm ] What platform? What's the type of cpu? I *think* Solaris/Sparc comes
+ 222154 [rubyfan@gm i] You might want take a look at RHDL ( http://rhdl.rubyforge.org )
  222164 [ara.t.howard] i was just looking at it... would you say it's a sledgehammer for this tack?
  222173 [rubyfan@gm i] Possibly.  Depends on how much modelling you need to do.  RHDL has

How can I populate header values in SOAP document?
222084 [Brian.Hartin] Got a question about the Ruby SOAP library.  I've generated a proxy
222199 [jeremy@hi eg] I'm not sure if it can be done dynamically, but you can create a
222207 [ara.t.howard] <snip code help>

[ANN] Correction, Vancouver Ruby Brigade, November 14th
222085 [zedshaw@ze s] Just getting the word out that we're actually meeting on the 14th (the REAL second Tuesday) not the 7th.  I'm sure all of you were waiting on the edge of your Aeron chairs to find out what happens.

[ANN] Rote 0.3.4 out now!
222086 [rossrt@ro co] Rote 0.3.4 is now available on Rubyforge (http://rote.rubyforge.org).

Beginning Ruby
222095 [phalcos@gm i] Im quite new to Ruby (unexpected heh?) but is currently planning on
+ 222101 [gavin.kistne] Welcome!
+ 222182 [james.britt@] You are encouraged to build your own Web tools; Ruby is quite good for

Some sort of array
222097 [sambient@gm ] ...
222105 [sambient@gm ] ...

Time without Date
222102 [listrecv@gm ] Is there any class or lib to deal with Times without Date?  (Eg "3:30
222118 [nospam@no it] Have you tried the Time class?
222125 [listrecv@gm ] The problem with Time is that it tracks a date also.
+ 222129 [listrecv@gm ] Is there a way to convert a Time (or DateTime) to Ruby's Date class?
| 222197 [kevin.olbric] I added a few conversion methods like this to 'ruby-units' gem
| 222204 [ara.t.howard] it's nice to have
| 222219 [jeremy@hi eg] And that's why we have facets!
+ 222134 [Bil.Kleb@NA ] To be sure, can you supply a test?
| 222138 [listrecv@gm ] at = TimeOnly.from_time(a)
+ 222179 [nospam@no it] #!/usr/bin/ruby -w

newbie q on class Foo::Bar
222106 [matt@ti bi s] What's the point of a class-within-a-class? For example, I take it that
222111 [nospam@no it] One reason is to create a class that is private. You may be aware that one
222113 [dblack@wo bl] The nesting won't give you privacy, though; the class can still be
222157 [matt@ti bi s] I'm glad you're weighing in here, since, though this is a common enough

Test::Unit    need help with assert
222110 [shayne.batem] I'm new to Ruby but have has some success bending it to my will. I am
+ 222121 [shayne.batem] Alright, I'm not too bright sometimes :)
| 222128 [interfecus@g] Unit tests aren't meant for counting how many assertions fail, they're
+ 222222 [pit@ca it in] Regards,
  222330 [shayne.batem] That was right on the money. Thanks

Trouble with Marshal
222114 [gavin.kistne] I'm trying to use Marshal on Windows to cache some results that take a
222123 [nicksieger@g] ...
222126 [gavin.kistne] It took less time than I thought to bring it down to a simple,
222127 [gavin.kistne] Reasonable sounding guess, but no dice. I just tried the test case (that
222131 [gavin.kistne] Bah...this time manually wrapped to less than 70 characters in the hope
222132 [gavin.kistne] Bah, my stupid fault. It was binary mode at stake, but on reading, not writing. Mauricio Fern?ndez kindly pointed out my error. Changing the above to...

222136 [hawkman.gelo] ...

gem and optparse : help needed
222142 [user@do ai .] (eg/usr/lib/ruby/gems/1.8/gems/mypackage/bin/foo)
222743 [nobu@ru y- a] It did display {:verbose=>true} as expected.

No continuations in Ruby2?
222151 [rubyfan@gm i] ....Ruby 2 will not have continuations.  Is this true?  If so, why
222397 [charles.nutt] I think this has been clarified in a few other forums, but it seems that

backtick commands and stderr
222158 [the.mindstor] When executing a system op using the backtick method, the standard
+ 222160 [gavin.kistne] I believe you want to look at open3 or open4
| 222161 [the.mindstor] Can you please add some more details?
| 222165 [the.mindstor] doesn't look like working on Windows.
| 222166 [gavin.kistne] open3 - http://www.ruby-doc.org/stdlib/libdoc/open3/rdoc/index.html
+ 222167 [wilsonb@gm i] output = `ls -Al 2>&1`
  + 222169 [the.mindstor] That was it! Great!
  + 222198 [dan.bikle@gm] ...
    222205 [ara.t.howard] man system

why is my singleton method called before the class is initialize?
222186 [bachase@gm i] class BigGuy
222187 [matt@ti bi s] "Initialize" is called when the class is instantiated (i.e. with new).
222188 [rick.denatal] True, but kind of beside the point.  The initialize method if and when
222200 [matt@ti bi s] Perhaps it's a matter of pedagogy. What *is* "the point"? That depends
222203 [bachase@gm i] I'll say thanks to both of you.  I think I was confused on all
+ 222206 [ara.t.howard] it's astonishingly hard to do in a generic way.  take my word for it, the
+ 222211 [matt@ti bi s] I guess I'm wondering: does it absolutely have to be a class method?
| 222290 [matt@ti bi s] Okay, scratch that. It's fatally flawed. Oh, well. m.
| 222303 [matt@ti bi s] ###
| 222340 [lukfugl@gm i] You can do away with the explicit "MiddleGuy" class and the clone
| 222363 [matt@ti bi s] Yeah! I could NOT for the life of me figure out how to make that
+ 222238 [jean.helou@g] If you want to do it at the class level instead of the instance level,

-bash: rails: command not found
222193 [matthewburto] I know lots of people seem to have this problem...I've been through the
+ 222202 [matt@ti bi s] locate has nothing to do with $PATH, and echo $PATH doesn't tell you
| 222320 [ben@bl yt in] Of course, this is going to take forever.  If locate tells you a
| 222361 [matt@ti bi s] find /usr -name "dummy"
| 222376 [ben@bl yt in] Significantly longer on mine, but I've got a slow HD and my /usr/local
+ 222446 [matthewburto] Figured it out. Everything was set up right, but my bash_login file

Server response time
222194 [jakattack2@g] I just started using SugarCRM an online CRM tool. I noticed that at
+ 222195 [cdcarter@gm ] ...
+ 222196 [wilsonb@gm i] Check out perform_action_with_benchmark in

[ANN] ActiveRecord::Extensions 0.0.5
222208 [zdennis@mk e] It includes better support for ActiveRecord find methods by supporting

nil.to_s != "nil"
222209 [ruby-ml@ki t] Is it possible to change NilClass#to_s to return "nil"
+ 222210 [priimak@st n] p nil.to_s.nil?
| 222213 [ruby-ml@ki t] I should have been clearer. I was wondering if it could
+ 222212 [nospam@no it] #!/usr/bin/ruby -w
| 222214 [collinsj@se ] I don't know what the real reason is, but it can be very useful when
+ 222310 [gavin@re in ] 1) #to_s should always return a string.
  222335 [ruby-ml@ki t] Right.
  + 222338 [ara.t.howard] problem = nil
  | + 222341 [gavin.kistne] How do you define "valid"?
  | + 222511 [logancapaldo] problem = ''
  |   222555 [gregory.t.br] Besides, we already have syntax that prevents this from being terribly
  + 222525 [vidar@ed ei ] It is consistent. "to_s" returns a string representation of the
  | 222533 [m_goldberg@a] <code>
  + 222530 [flori@ni e. ] # => "a"

Singleton Methods
222217 [bparanj@gm i] What is the purpose of singleton method? Why is singleton method
+ 222220 [ruby-ml@ki t] That, precisely, IS the point of a singleton method: being defined
+ 222223 [max@ma id or] You call Article.new. new is the singleton method of object Article.
| 222289 [rick.denatal] Not really.
+ 222331 [gavin@re in ] class Person

Getting (var = false) to return true?
222225 [joeat303@ya ] def before_update
222226 [farrel.lifso] def before_update
+ 222227 [farrel.lifso] Whoops there's a syntax error in my solution. You want
+ 222228 [joeat303@ya ] Nah, I need the value returned from the function to always be true. Hmm,
  + 222229 [farrel.lifso] Ruby considers any object that is not false or nil to be true.
  | 222233 [joeat303@ya ] Yup.
  + 222249 [twifkak@co c] Err... why is that better than
  + 222348 [shortcutter@] In that case the code is too complicated.  Rather use

222230 [erikveen@gm ] Try ruby-talk-ctl@ruby-lang.org.

Gem error on "require 'rubygems'"
222232 [luc.juggery@] I have decided to move to ruby to make the util script I usually do in Perl.
222243 [Bil.Kleb@NA ] Do you have RubyGem Hoe 1.1.2 installed?  I.e.,
222248 [luc.juggery@] I guess it should not installed......
222251 [TimHunter@nc] The "rmagick" gem is for *nix installs. Use the rmagick-win32 gem for Win32.
223497 [luc.juggery@] Thanks Timothy,

Display Mailing List Header (Was: [empty subject])
222244 [ jupp@gm .d ] If one frequently subscribes and unsubscribes mailing lists and uses
222295 [rick.denatal] I suspect though that those who are savvy enough to find an use these
222301 [hgs@dm .a .u] There's an edge case: I've forgotten about tbe meta-data in headers

OT: Ruby Quiz in Haskell
222245 [jim@sd -e .o] Haskell and collecting the results here -
+ 222254 [james@gr yp ] I'm thrilled to hear that others are enjoying the quiz.  The problems
+ 222255 [martindemell] Neat :) I started doing them in Common Lisp but then got sidetracked -
| 222260 [louis.j.scor] I was actually writing up a couple of articles on doing the quiz
| + 222292 [jim@sd -e .o] There is a writeup of the first quiz in Haskell here -
| + 222437 [jtregunna@bl] I've done a few in Io and my own little toy language.
+ 222280 [d454d@we .d ] Great! I just recently decided to have a look at Haskell - so having
+ 222332 [james@gr yp ] I've added a link to this in the Ruby Quiz FAQ.

[ANN] London Ruby User Group (LRUG), 13 November 2006
222246 [rob.02004@gm] The next LRUG meeting will be on Monday November 13, 6:30-8pm

[QUIZ] Fuzzy Time (#99)
222253 [james@gr yp ] 1.  Please do not post any solutions or spoiler discussion for this quiz until
+ 222319 [ara.t.howard] it seems like #2 and #3 contradict one another.  imagine it's 10:45 and,
| + 222323 [gavin.kistne] That's correct; why do you call this a contradiction?
| | 222337 [ara.t.howard] right.  i understood that.  but this is where i see the contradiction:  from
| | 222345 [gavin.kistne] a) It's not 'static', given the implied variable ambiguity implied by
| + 222325 [louis.j.scor] Indeed.  I take it that the challenge of the quiz is to come up with a
+ 222631 [louis.j.scor] #!/usr/bin/env ruby
+ 222632 [wardies@gm i] Thanks for this week's interesting problem.  My solution is below and
| 222641 [james@gr yp ] Then let me be one of the first to welcome you to Ruby and the Ruby
| 222654 [hungrylist@g] Here's is my script. It was fun working at it, just please no more
| 222657 [hungrylist@g] I've posted an old version the second line of initialize should be changed from
+ 222668 [bg-rubytalk@] Here's my effort.  I didn't get around to testing it, but the concept
+ 222672 [jeremy@hi eg] Ahh, it feels good to do a ruby quiz again :-).  I've ignored the other
| 222677 [bob.conn@bt ] This is my first submission to the list and I'm new to Ruby too.  I'm
| + 222682 [gavin.kistne] For what it's worth, here's the test code I've written to test submissions. I'm not 100% sure that it's correctly testing things yet, but I think it is :)
| | + 222693 [jeremy@hi eg] Woo Hoo! I ran it on mine and it passed.  My variation was as follows. Although
| | + 222796 [tomp@ea th i] It looks like your test code expects FuzzyTime.to_s to use 24-hour
| + 222741 [james@gr yp ] Welcome!
|   + 222840 [bob.conn@bt ] James
|   | + 222841 [gavin.kistne] variable names) and then on a whim decided to post it in case someone
|   | + 222842 [vincent.four] def something
|   + 222918 [martindemell] I usually do something like @display = @actual + (5*60)*(1 - rand(2)*2)
+ 222696 [caleb.powell] ...
| 222703 [thomasmuelle] I'm new to Ruby and this is the first quiz I'm doing. Not sure if I'm
+ 222784 [tomp@ea th i] Here's my entry.  I haven't peeked at any of the other responses yet,
  222952 [tomp@ea th i] Out of curiosity, I tried translating Cameron's method into my code.
  222984 [hungrylist@g] Here's a unit test that does a similar test against my class. It's a

Re: [ANN] Potential Brit ruby meeting formerly Chunky Bacon
222257 [hgs@dm .a .u] Sideshow Bob uses Ruby???? :-)

Ruby's book list is out of date...
222263 [jeremymcanal] I was snooping about the Ruby site the other day (OK, like two weeks
+ 222318 [keith@au io ] Nearly, it goes to the printer in mid December so should be in
+ 222405 [james@gr yp ] OK.
| 222413 [james@gr yp ] James Edward Gray II
+ 222452 [james.britt@] If folks are aware of Ruby books not listed, please let me know.
  + 222456 [eastmedianyc] ...
  + 222485 [Bil.Kleb@NA ] Is there a way to apply the DRY principle for these two?
    222506 [james.britt@] Redundant array of Ruby resources.
    222529 [james@gr yp ] It does seem like a needless duplication of effort.  I'l ask the ruby-
    222561 [jeremymcanal] That may work, except that many books won't fit into their current
    222564 [james@gr yp ] Ruby-lang.org now points to the list to ruby-doc.org, so please send
    222736 [jeremymcanal] You didn't update the sidebar, so when users click on that to get to
    222745 [james@gr yp ] Good catch.  Sorry about that.  It's fixed now.