166292-406105 subjects 166708-167307

why is my array a hash?
166502 [michelle@co ] I have a chunk of code, where I define an array, and the very next time
166503 [penryu@ve et] Ruby doesn't think step is a hash.
166504 [michelle@co ] Thanks, now if I could only teach Vim to match do,end pairs the way

Hash Value Assignment Bug?
166507 [nshb@in mi .] I have been trying to build a ACL system, and found what I believe is a bug.
166510 [ dez@ma .c m] Your are assigning a key of :id to result, but accessing a key
166516 [nshb@in mi .] Thanks Derek, appears it was a simple typo. Shortly after I sent this I

Embedding Ruby
166518 [daniel@vo lk] as a personal excercise I'd like to write a native little ruby starter
166582 [dooby@d1 .k ] Big static library containg all the object modules --
166621 [daniel@vo lk] Great! Thanks a lot. I had a look into the lib directory but I didn't

An alternative to Gems
166535 [transfire@gm] As I've mentioned before, I am concerned about Ruby becoming tied to
+ 166538 [blargity@gm ] I use rubyscript2exe to package whatever I'm dealing with, as usually it's
+ 166557 [halostatue@g] Yes, you have. I, however, am not. I think you're worried about nothing.
  + 166558 [halostatue@g] To be perfectly and painfully clear: I'm not just talking to Trans
  | 166572 [jim@fr ez .o] I haven't been following this thread and I don't know what has
  + 166562 [f@an re s- .] Sometimes it could help to actually read the post you are replying to.
  | 166573 [halostatue@g] I did read. I will admit to having missed that. Trans would be better
  + 166574 [ljz@as as .c] I'm not going to get involved in this discussion other than to make one
  | 166576 [gregory.t.br] I am fully ignorant to the Gem issues, except for the latest annoying
  | 166577 [ljz@as as .c] As Trans mentioned, he is cleaning up that code and fully intends to
  + 166594 [pit@ca it in] IIUC, Tom suggested to split support for versioning and packaging.
  | + 166596 [james_b@ne r] Not to discourage Austin from replying here, but the fairly recent
  | | 166599 [pit@ca it in] (My memory is poor, so) I don't remember pros and cons about splitting
  | + 166623 [halostatue@g] Separation of concerns is all fine and good when you're dealing with
  |   166628 [ara.t.howard] it seems you are arguing for the existence of a linker.  i agreet that this is
  |   166636 [pit@ca it in] Which is, as far as I understood, more or less what Tom proposed. A
  |   166672 [halostatue@g] Except that Trans has taken an irrational dislike to the way that
  + 166617 [Bil.Kleb@NA ] IMHO, the acronym STFU doesn't belong anywhere
  | + 166620 [eustaquioran] I agree. People here are nice, more than any other
  | + 166648 [mailing-list] Nor does IMHO for basically the same reason.  Seriously, when is an
  |   166649 [Bil.Kleb@NA ] For whatever reason, I don't view IMHO as inflammatory
  |   166695 [mailing-list] Yeah, I was just being a bit silly (and you seem to have picked up on
  + 166642 [george.mosch] I guess you could be a bit more polite :(

Cond loop vs iterator and scope questions
166537 [toddkennethb] 1. Why is it that you cannot have an iterator nested inside a
+ 166539 [james@gr yp ] You can.  Please show us the code and we'll help you find the problem.
| 166551 [toddkennethb] irb(main):001:0> f=[1,2]
| + 166552 [vjoel@pa h. ] ^^ No "do" here.
| + 166554 [james@gr yp ] There's a syntax error in the above line.  It's just while ... end,
| + 166555 [langstefan@g] remove this "do"
+ 166542 [ruby.brian@g] As james said, you can.
  166559 [toddkennethb] OK, maybe I'm going about it the wrong way.  I specified it wrong in
  166560 [james@gr yp ] => nil
  166563 [toddkennethb] This is in fact how I'm doing it now, but I guess I was trying to avoid

Small practice programs
166548 [brianmartin@] For someone with some programming background and an interest in
+ 166549 [gregory.t.br] These are great challenges that help build up your skills and also are
| 166566 [brianmartin@] Is there any site similar to Ruby quiz with some slightly easier
| + 166568 [pat.eyler@gm] It's kind of like a ruby quiz in slow motion.
| + 166569 [james@gr yp ] The Ruby Quizzes come in all sizes and difficultly.  This week's,
| + 166570 [gregory.t.br] Before University of New Haven Ruby Brigade became New Haven Ruby
| + 166602 [chris@pi e. ] Of course, the earlier ones are quite easy (but it wouldn't hurt to
|   166643 [steve.butche] Although some of these are quite difficult (involving, say, dynamic
+ 166561 [james_b@ne r] Do you use a computer on a regular basis?  Do you find yourself doing

Building Ruby 1.8.2 on HP-UX 10.20
166550 [gerardo.sant] cc -Ae -g  -DYYMAXDEPTH=300  -I. -I.  -c ./missing/vsnprintf.c
+ 166619 [kero@ch ll .] Is the stdio.h in error itself, or did Ruby override something it shouldn't
| 166640 [gerardo.sant] Thanks Kero
| 166641 [decoux@mo lo] You have an online translator at
+ 166646 [matz@ru y- a] Does this patch help you?
  166650 [gerardo.sant] (Kero: I tried 1.8.3 and it was the same)
  + 166692 [gerardo.sant] I tried with 1.8.4preview1 and got the same problem. But the error
  + 166694 [matz@ru y- a] Try the attached patch, please.
    166739 [gerardo.sant] Just in case you haven't noticed yet, I've sent you in private the

RAA today?
166553 [vjoel@pa h. ] I just noticed this today. Has RAA been broken for a while, or did it

Net::HTTP transfer limit
166564 [smorabito@gm] ...

matchit.vim (was: why is my array a hash?)
166565 [wybo@se va y] It *is* loaded - I tested that by introducing an error (iif instead of if)
166604 [penryu@sa yi] Yup.  However, Item 6 in ftplugin/ruby.vim maybe be misleading.
166627 [wybo@se va y] no, it doesn't; :se syntax says syntax=ruby and :echo b:match_words

OT: "Intellectual property" (was: Re: Ruby not commercial, right?)
166567 [christophe.g] Incorrect. "Intellectual Property" is a deliberately confusing term used
166571 [gregory.t.br] I agree.  Avoiding the term 'intellectual property' is important.

Trailing \ in %q[\a\b\c\] not treated as literal???
166575 [NoOne@No he ] ruby 1.8.2 (2004-12-25) [i386-mswin32]
+ 166579 [discordantus] 'Mark\'s string'%q[square (\]) bracket]
+ 166580 [kevin.olbric] In a quoted string, a \cx is an escape for ctrl-x, so the \c\] is
+ 166608 [NoOne@No he ] Thanks.  I forgot about viewing %q?....? as a generalized single-quoted

Environment Variable for Ruby on Rails
166585 [tomrossi7@gm] Is there an entry in the request.env hash for the host header?  I can
+ 166587 [jeremy@bi sw] request.host is the method you're looking for.  See the docs for
| 166713 [tomrossi7@gm] Perfect!  Unfortunately, I can't seem to find the documentation though
| 166719 [jeremy@bi sw] An oversight; its documentation is exposed the next release.
+ 166589 [nshb@in mi .] request.env.inspect to find out anything about the internals of a hash.
  166645 [tomrossi7@gm] ..inspect is very useful indeed!  Thanks!

ruby lexer/parser package ?
166586 [didier.proph] a quick question: is there a lex/yacc package for ruby ? or actually
+ 166588 [dbalmain.ml@] Check out Racc. It comes with ruby in the standard library.
| 166592 [james@gr yp ] Tiny clarification, the Racc *runtime* is a standard library.
+ 166593 [eric.mahurin] Here are the general parser (and sometimes lexer) packages I found on
  166644 [didier.proph] David, James, Eric,
  166655 [eric.mahurin] For mine, a lexer and parser are made identically - one parses

problems with making wordwrap
166591 [l.d.u.n.c.a.] i've found a great bit of code from
+ 166597 [pit@ca it in] can you tell us how you want to treat whitespace in the given text? You
| 166605 [l.d.u.n.c.a.] that
| 166616 [pit@ca it in] class String
| 166705 [l.d.u.n.c.a.] thanks pit,
+ 166600 [drbrain@se m] def wrap(text)
| 166624 [halostatue@g] If I remember correctly, portions or the whole of Text::Format is
+ 166683 [w_a_x_man@ya] text.gsub( /(.{1,39}[^\s])([ \t]*\n[ \t]*|[ \t]+|$)/, "\\1\n")

166595 [blargity@gm ] I'm trying to use ActionMailer without rails.  Perhaps I'm tired, but I am
+ 166598 [drbrain@se m] Eric Hodel - drbrain@segment7.net - http://segment7.net
+ 166601 [jeremy@bi sw] Follow the example code at the top of

problem with .each do
166606 [michelle@co ] What's going on?
+ 166610 [ljz@as as .c] It turns out that Net::Http#get no longer returns a pair of values.  It
+ 166611 [daniel.schie] Try `data.each do |line|'. It may be the line break that's causing trouble.
  166613 [daniel.schie] Sorry, it actually seems to work even with the line break. My bad.

return in blocks
166609 [lyndon.samso] Whats the official word on using return to return a value in a block,
+ 166612 [matz@ru y- a] Usually use "break <value>" to pass a value from a block.
+ 166725 [lthiryidontw] return in a block doesn't just return the block, it returns the method
  166728 [lyndon.samso] ...

Create dynamic tests for Test::Unit
166622 [achim.domma@] I have some experiences in generic programming in python and .Net but
166639 [pit@ca it in] require "test/unit"
166767 [achim.domma@] Thanks, that's what I was looking for. Seems like I have to learn much

[QUIZ SOLUTION] Euchre Hands (#55)
166625 [robin@ni or ] This one seemed pretty easy, so I gave it a try.
+ 166630 [chneukirchen] =begin
| + 166635 [leavengood@g] I made two solutions, both of which use the same basic algorithm of
| + 166653 [james@gr yp ] test_hand.txtNeo:~/Documents/Ruby/Ruby Quiz$ ruby solutions/Christian
|   166656 [chneukirchen] Difficult.  Mine doesn't (yet?) reorder if there are no cards of every
+ 166634 [ef@al m. it ] [QUIZ SOLUTION] Euchre Hands (#55)
+ 166652 [james@gr yp ] test_hand.txt
| 166663 [robin@ni or ] Ah, thank you... I just noticed that I forgot the queen in my Faces array :)
+ 166709 [dbatml@gm .d] Here is my solution.
  166714 [dbatml@gm .d] Here is another solution to the problem. I got the idea for this while
  + 166718 [zed.lopez@gm] A couple of my early attempts depended on the idea that the trump suit
  | + 166729 [dbatml@gm .d] reply to Christian's solution)...
  | | 166733 [leavengood@g] Thanks to inspiration from reading Zed Lopez's code, I've been able to
  | | 166734 [dbalmain.ml@] Ryan, how about changing /(J#{u})|(J#{v})/ to /J[#{u}#{v}]/? That'll
  | | + 166735 [dbalmain.ml@] Here's my terribly hacky version of Ryans;
  | | | 166741 [adam.shelly@] ...
  | | | 166747 [adam.shelly@] ...
  | | + 166738 [dbalmain.ml@] Damn, now I can see why you did it that way. Sorry. Please disregard.
  | |   166740 [pit@ca it in] No, your idea is right: he could still save one character using
  | |   166742 [dbalmain.ml@] This is the last time I play golf. It's addictive and I should be working.
  | |   166746 [dbalmain.ml@] Got to get back to work. 166 chars;
  | |   166831 [leavengood@g] Brilliant. I'm extremely impressed. I learned quite a bit from it too,
  | + 166978 [bob_showalte] I addressed this by generating a suit order in alternating colors
  |   167137 [zed.lopez@gm] I did it kind of bottom-up to your approach's top-down -- starting
  + 166862 [dbatml@gm .d] Here is a corrected version, that hopefully gets the color alternation
    166877 [daniels@pr n] Because I'm an idiot and didn't read the quiz spec properly, or test my
    166881 [daniels@pr n] And one last time, to account for hands that don't have one of the

Pipelined Processing
166626 [bob.news@gm ] ...
+ 166669 [pesterhazy@g] ...
| 166673 [bob.news@gm ] It's not really similar.  While my program executes several stages of
| 166678 [pesterhazy@g] class Source
+ 166680 [sean.ohalpin] One idea that springs to mind is to keep a responsive monitor thread
+ 166743 [ptkwt@ar cn ] True, without native threads you won't really gain any performance, but what

[SiSU] book/document generator, sample documents: summary page for document markup and output
166632 [Ralph.Amissa] SiSU is a document generator, written in Ruby,

problems with Tests that fail and prettyprint
166633 [ jsw@ab .c m] It may be an artifact of my installation (Ruby 1.8.2 on Windows) but when my

Crash Course on Speed for Ruby
166647 [damphyr@fr e] Well, we hold this once-a-month workshop at work to share knowledge
+ 166657 [edder@tk sp ] Posted via http://www.ruby-forum.com/.
+ 166661 [daniel.schie] Though you better ask for permission first :)
  166664 [damphyr@fr e] Niaghhhhh, I get the urge to strangle DHH sometimes :).
  166768 [achim.domma@] I just come over this thread an had a look at the slides. Could someboy
  166790 [johnwilger@g] +1
  + 166791 [ara.t.howard] perhaps magickpoint or ooffice.
  + 166793 [kvanderauwer] I suppose it could have been build using S5
    166814 [d454d@we .d ] Great! That's the link of the day! I was looking for this kind of

Help requested: new book
166651 [mark.watson@] I would appreciate some help defining the topics for a new free web
+ 166654 [leonardo.elo] Very nice initiative Mark, I'm also planning in writing a Ruby book in
| 166691 [mark.watson@] Thanks Leonardo. I will have Linux specific material, but not Windows
+ 166658 [james_b@ne r] What, exactly, does "Enterprise" mean here?
| + 166688 [mark.watson@] Good ideas, thanks. Even for legacy databases not using the RoR
| + 166696 [mark.watson@] I have been thinking more on "Enterprise" - yes this does have a "huge
|   166697 [hal9000@hy e] _Ruby for the Voyager_?   ;)
+ 166681 [edavis10@gm ] Take a look at http://www.lulu.com
+ 166682 [lyndon.samso] ...
| 166690 [mark.watson@] Good ideas - thanks!
+ 167018 [jgbailey@gm ] A section on domain specific languages (DSLs) could be good. I've been
| 167022 [gjblomquist@] I'd definitely like to see a section on DSLs as well !  I read Fowler's
| 167041 [leavengood@g] Ryan
+ 167029 [snail@ob me ] Watson <mark.watson@gmail.com> writes

Problems with Gruff
166659 [hoyhoy@gm il] I've been trying to use Geoffrey Grosenbach's excellent Gruff package,
166666 [f@an re s- .] That usually happens when your RMagick install is broken. I'm not sure,
166674 [hoyhoy@gm il] Interesting...  I actually installed rmagick from gems, but ImageMagick
166676 [cyclists@nc ] Did the RMagick examples run with no errors when you installed the
166693 [hoyhoy@gm il] Yeah, I figured it out.  ImageMagick was busted when installed from
166699 [cyclists@nc ] A fellow named Alex Young says he's got an easy way to install
+ 166700 [hoyhoy@gm il] CPPFLAGS="-I/opt/local/include " CFLAGS=$CPPFLAGS \
+ 166701 [hoyhoy@gm il] CPPFLAGS="-I/opt/local/include " CFLAGS=$CPPFLAGS \
  166704 [hoyhoy@gm il] I actually had to remove RMagick and ImageMagick, and re-build clean

Passing the class as an argument
166660 [damphyr@fr e] I'm too lazy to figure it out (and a bit hangover).
+ 166662 [damphyr@fr e] And to clarify (it's just impossible to concentrate today :( ).
+ 166665 [dblack@wo bl] Are you sure you've got Count as a method name?  It's possible, but
  166698 [damphyr@fr e] Yeap, we're not talking Ruby objects here. It's an OLE API and it uses

problems using ruby:libcrypto.so.0.9.8: open failed: No such file
166668 [vshevde@ho m] I wanted to request help on trying to resolve an error while running a rb
166763 [decoux@mo lo] try to add the directory /user/local/ssl/lib/ in LD_LIBRARY_PATH
166784 [vshevde@ho m] ...

Re: Euchre Hands (#55)
166671 [dale.martens] I used to play euchre a lot in college so this was fun. It might be fun
+ 166707 [james@gr yp ] I agree.  Maybe if you and I got a server together, building AI
| 166712 [interfecus@g] I seriously debated with myself whether it was worth submitting my
+ 166715 [zed.lopez@gm] class Euchre

Four Rinda Questions
166675 [a.griesser@g] Rinda looks very interesting, but appears to differ in puzzling ways
166842 [drbrain@se m] No.  You could make something similar by using references to a Thread.

what does :: do in this case?
166677 [petermichaux] This is in the Rails acts_as_list module but I think is a general Ruby
166679 [halostatue@g] Unless that's in a section of string code to be evaled, that's

Building an array of matching strings.
166684 [ljz@as as .c] I want to search through a block of text and build an array of all
+ 166685 [james@gr yp ] matches = text.scan(...)
+ 166686 [logancapaldo] ...
+ 166687 [ezra@ya im -] result_array = text.scan(/pat/)
  166689 [ljz@as as .c] Aha!  I had forgotten about the 'scan' method!  Thanks to all of you who
  166717 [tomrossi7@gm] What if we wanted to expand it a little?  For instance, Iets say the

Fwd: Please Forward: Ruby Quiz Submission
166703 [james@gr yp ] ...

Parsing excel CVS data on a mac OSX to extract blocks of cells
166706 [anne@wj .h r] I would like to parse some excel CVS data which has a repetitive block
+ 166710 [anne@wj .h r] It extracts columns from a CVS file, and working my way through it, I
+ 166716 [ara.t.howard] require "csv"
+ 166732 [james@gr yp ] Well, if you're on Windows, Ruby is looking for a \015\012 sequence
+ 166736 [gregory.t.br] This might be overkill and more useful when it is more complete, but
| 166737 [gregory.t.br] As a side not, you do not need to install DBI or any database related
| 166775 [anne@wj .h r] Thank you so much for your help
| + 166778 [james@gr yp ] Excel might be legacy enough that it's still using \r as a return
| + 166779 [gene.tani@gm] - specify $/ input record separator and $\ output separators for
| + 166785 [ara.t.howard] run dos2unix on it.  if it still fails you'll need see why the file is badly
|   167214 [anne@wj .h r] I have moved onto Tiger. Still much installing to do. Sorry in the
|   167372 [netghost@gm ] I've had a similar problem.  It sounds like you used Excel somewhere.
+ 167806 [martindemell] #------------------------------------------------