195599-355623 subjects 196087-197990

195870 [curi@cu i. s] I bet there's a more elegant way to write this. Anyone want to show me?
+ 195871 [alder.green@] li.uniq.collect {|i| [li.select {|j| j == i}.size, i]}.sort.last.last
+ 195874 [daniels@pr n] It would probably help if you said what you were trying to achieve
  195877 [curi@cu i. s] cool, thanks, collecting pairs works well.
  196063 [m.fellinger@] li.inject(Hash.new(0)){|s,v| s[v] += 1; s}.max.last
  196090 [has.sox@gm i] ...
  196107 [simon.kroege] li.sort_by{|x| li.select{|y| x==y}.length}.last
  196113 [simon.kroege] even better (if === does what you expect)
  196121 [eban@os ri .] In 1.9, you can use Enumerable#max_by.

parsing a boolean expression
195872 [danielbaird@] ...
+ 195898 [M.B.Smillie@] Well, there is and there isn't.  If you know how to write grammars in
| 195904 [danielbaird@] ...
| 195943 [ara.t.howard] this is extremely short and relatively secure, it may fit depending on your use
+ 195902 [schapht@gm i] If you can force (or just add on) an exterior set of parenthesis, S-

Like BitStruct, but better?
195879 [ben@ia u. et] So what I'm really looking for is something that is like the (reasonably
196005 [vjoel@pa h. ] Unsigned and signed integer fields >32 bits (and 1..16, 24, or 32 bits)
196052 [ben@ia u. et] classes that needed 64 bit ints with a hi and lo part. Thanks for the tip,
196057 [vjoel@pa h. ] This is a good point (about String as the base class), and it brings up

Can we extract any value from xml file.
195881 [tanushree.bh] ...
195882 [farrel.lifso] Have a look at REXML, specifically it's XPath functionality.

Mongrel Pre-Release 0.3.13 -- Katana Suicide Concurrency
195885 [zedshaw@ze s] We are *days* away from the official 0.3.13 release, which will be

isset kinda function
195886 [alexandrucop] Looking for something like PHP's isset.
+ 195887 [alexandrucop] And something like print_r to display an array.
| 195891 [florgro@gm i] require 'yaml'; y(obj)
+ 195889 [florgro@gm i] defined?() will work, but usually you won't need it. Depending on what
  195890 [alexandrucop] Well, I have something like this
  195892 [florgro@gm i] Seems like session[:cart] is nil. You can just do
  195894 [alexandrucop] Thank you very much.

fcgid or FastCGI
195888 [tallison@ta ] OK, I'm a very slow starter...  Perhaps it's caution?

Why doesn't method_missing affect respond_to?
195893 [pergesu@gm i] class Foo
+ 195895 [dblack@wo bl] Maybe because that would render #respond_to? essentially useless :-)
| 195956 [pergesu@gm i] In my example where the object responds to everything, sure.  It was
| 195970 [rmagick@gm i] Not to mention the problems that could occur when Ruby tries calling a
+ 195897 [khaines@en g] Think about it from an implementation perspective.  How is respond_to? to know
+ 195899 [rmagick@gm i] The respond_to method can't know what method_missing is doing with
  195920 [Rob@Ag le on] # foo.rb

Creating Daemon Processes in Windows.
195901 [jatinder.sau] ...
195903 [vshepelev@im] Windows has daemon-like concept named "service". There is win32-service
196056 [jatinder.sau] ...

New webserver
195906 [stuart@se ve] Im designing a webserver as my first project on Ruby
+ 195907 [snowblink@gm] gsub
+ 195909 [ehames@gm il] ...
+ 195912 [mariano.kamp] not sure if it is a good idea to handle security on this level, but
| 195927 [stuart@se ve] Thanks all, this worked fine
| + 195933 [james@gr yp ] def self.path(path)
| + 195934 [schapht@gm i] def self.path(path)
| + 195935 [mariano.kamp] Stuart,
| + 195938 [alex@bl ck e] In addition to what others have said, have a look at File.expand_path.
+ 196016 [daniels@pr n] If you want to write a http server, read the http specification and go
  196091 [stuart@se ve] Thanks everyone for your help
  196124 [stuart@se ve] off subject

FXRuby: updating a text label/positioning question
195908 [Nuralanur@ao] ...
195939 [lyle.johnson] I didn't follow all of that very well, but I think your question boils

[ANN] ruby-breakpoint 0.5.1: Now with less bugs
195917 [florgro@gm i] I've finally decided to do a bug fix release for ruby-breakpoint.

Directory.entries problems with while loops
195918 [taitbp@ya oo] I am trying to create an array with all the files of a directory of a
195924 [cremes.devli] Show us some code and then we can help.
195926 [taitbp@ya oo] here is the code
+ 195930 [cremes.devli] counter=+1
+ 195932 [mariano.kamp] did you look at Dir.glob
+ 196018 [pete@no ah t] I've got to say, this is the least Ruby-ish Ruby I've ever seen!
  196020 [ara.t.howard] i realize it doesn't apply for most people, but i make a habit of always using

Ruby on mobile devices?
195919 [robert.feldt] Anyone seen any work on running Ruby on mobile devices like mobile
195985 [vjoel@pa h. ] I've had some luck with ruby on gumstix, which have ARM/XScale

Need help with TDD, stubs and mocks
195936 [cremes.devli] I'm writing a script to process a directory structure and some files
195952 [jim@we ri hh] Code not done test first will often be hard to test.  I think we just
195969 [cremes.devli] Jim,
196006 [jim@we ri hh] I don't have enough information to make a recommendation one way or

Using Ant from Ruby
195940 [Sanchit.Misr] I am writing a Ruby script to automate some process. Part of it involves
+ 195948 [langstefan@g] I guess the "ant" command on Windows resolves to an ant.bat or ant.cmd
| 195955 [Sanchit.Misr] system "ant.bat" worked!! thanks a lot
+ 195949 [excity@gm il] `cmd /c ant`
  195958 [Sanchit.Misr] `cmd /c ant` also worked!

Inheritance from c
195942 [phil@sh ll r] I'm messing about with inheritance from my C application but can't get it to
195984 [vjoel@pa h. ] I'm not sure I understand, but it sounds like you want your Helloworld
196067 [phil@sh ll r] [ ..snip.. ]

Q about instance_eval
195950 [vshepelev@im] I tried some strange kind of things.

Window path runtime error
195961 [taitbp@ya oo] I am quite the newbie when it comes to exception handling so i was just

reading data from excel
195962 [ghotrapa@ya ] I'm brand new to Ruby.
+ 195965 [madan.manoha] require 'win23ole'
| + 195967 [madan.manoha] Oops, 'win23ole' should have read 'win32ole'
| + 195993 [ghotrapa@ya ] Madan Thanks for your quick response.
| | 196022 [david.mullet] Parvinder-
| + 197011 [ghotrapa@ya ] Thanks everybody for your time and help.
+ 196002 [djberg96@gm ] In addition to using win32ole, also see the "parseexcel" package.
+ 196003 [seanacarley@] ...
+ 197146 [pfharlockk@g] ...
| 197351 [ghotrapa@ya ] Thanks Gary, it seems like a pretty good source of information.
+ 302595 [coolwong85@y] I cannot read excel in require 'fox16'. How can I do to run excel file?
| 302699 [nnnnon@gm il] win32ole
+ 302700 [shevken@gm i] Simplier approach, if possible, save the excel in csv format.

Call rb_instance_eval from C code
195972 [vshepelev@im] VALUE proc; //contains object of class Proc
195982 [ruby-talk@wh] rb_funcall(obj, rb_intern("instance_eval"), 1, proc);
195986 [ mfp@ac .o g] I don't think that will work: proc is not a String but a Proc (TypeError).
196000 [ruby-talk@wh] Ohhhh.  I guess define_method can take a proc, though.  Back to ye olde cloaker.
+ 196099 [vshepelev@im] Thanks why! Would try this.
+ 196299 [ mfp@ac .o g] Nice hack :)
  196370 [vshepelev@im] Behalf Of Mauricio Fernandez

Re: Nebular Gauntlet 0.1
195979 [jesusrubsyou] Could you put up any screenshots?  :)
195983 [steviedizzle] Sadly, the screenshots don't really do the game much justice as I am not

Object Troubles - undefined method `+'
195988 [paul.kraus@g] ...
+ 195990 [johan.veenst] ...
+ 195992 [paul.kraus@g] ...
+ 195996 [dharple@ge e] You are trying to set local variables. Instance variables are
+ 195997 [lukfugl@gm i] You're problem here is that on line 14, you are actually using a local

Ruby Whitepapers
196004 [Eric.Armstro] pointer to them at Artima, where it's easy to collect
196013 [jgbailey@gm ] ...

Problem with setting up rubygem
196015 [victorfan88o] I am trying to set up Rubygems on my Linux machine; however, I've got
196187 [victorfan88o] Never mind, I've discovered that I made some stupid mistakes while I set

Modules / Documentation / CPAN like repository??
196026 [paul.kraus@g] ...
+ 196032 [james@gr yp ] ri
+ 196037 [james_b@ne r] ri String

Bzipping a file from ruby
196028 [ehames@gm il] Is there a way to bzip2 a file from Ruby without invoking the unix
196030 [aredridel@nb] I don't know of any pure ruby implementations of the bzip2 algorithm. I
196058 [alder.green@] Yup. I was looking for such a thing myself, and only found bz2[1]. In

Ruby and the Open-Closed Principle
196038 [cohen.jeff@g] For most of my OO career (C++ for a long time, and then C#) I believed
+ 196051 [deanwampler@] I use both, judiciously, especially modifications of library classes.
| 196072 [dblack@wo bl] The problem is that once you add behavior, it is existing, and someone
| + 196082 [jim@we ri hh] The problem with block-scoped behavior changes is that they are not
| + 196085 [codeblogger@] ...
|   196088 [dblack@wo bl] Yes, but that's not necessarily enough.  You can't test in advance
|   196089 [schapht@gm i] I think Codeblogger was trying to say that when someone does write
|   196110 [shortcutter@] This won't help if other code breaks because *you* redefined a core
|   196114 [codeblogger@] ...
+ 196055 [pergesu@gm i] Personally, I'm not not sure that the 20.minutes.ago type of extension
| 196117 [Gennady.Byst] What does it make your code, then? ;-)
| + 196119 [schapht@gm i] Pregnant!
| + 196133 [pergesu@gm i] The only way I can interpret this is that if I don't like language
+ 196079 [jim@we ri hh] But isn't this the essence of OCP?  The ability to extend a class (open
  + 196096 [cohen.jeff@g] Could be... but I guess I understood the essence of OCP to mean I can't
  | 196127 [Stephen.L.Mo] Jeff,
  + 196142 [deanwampler@] Yes, you're exactly right! I forgot that the most precise and

Writing to a file without opening it
196042 [sy1234@gm il] File.open(file, 'a+') won't work when the file is not readable.
+ 196044 [ara.t.howard] open("file", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = 3
| 196265 [sy1234@gm il] Just a quick thanks.. this pointed me in the right direction for some
+ 196071 [john-rubytal] Use mode 'a' instead of 'a+' in File.open
  196075 [sy1234@gm il] That worked like a charm, thanks!

[ANN] Ruby Reports 0.4.4
196053 [gregory.t.br] == Ruport 0.4.4 ==

196062 [hal9000@hy e] Who owns ruby-forum.com and why is it connected
196070 [florgro@gm i] I think it being connected to the mailing list has a lot of benefits and
+ 196073 [daniel@vo lk] I guess it is Andreas Schwarz, as the footer suggested!?
+ 196080 [halostatue@g] No, not spam. If, however, you look at the quality of postings that
  196081 [rossrt@ro co] Just that would be an improvement, IMO.
  196083 [jim@we ri hh] That might be helpful.
  + 196086 [toalett@gm i] It's nice to skim the list, but I find it's easy to misquote when you
  + 196112 [M.B.Smillie@] It might be helpful, but I'm not really sure that it's the medium of
    196164 [james_b@ne r] I read an article on someone's site that critiqued Ruby form the view of
    196165 [charlie@ca t] ...
    196167 [rmagick@gm i] I get the idea that Andreas Schwarz, the man behind ruby-forum, is
    + 196172 [M.B.Smillie@] I've sent him a pointer and summary.
    | + 196492 [jesusrubsyou] Here's to hoping we get not only a response, but some action.  It hasn't
    | | + 196562 [louis.j.scor] How about adding an extra header to the messages sent via the forum
    | | + 196597 [leavengood@g] All of these are nice and would be welcome. I don't see ruby-forum
    | |   197408 [buppcpp@ya o] What is happening to Ruby?
    | |   + 197434 [M.B.Smillie@] How are new users being pushed away?  Seriously, have there been any
    | |   + 197450 [halostatue@g] Neither of these statements is true. The former is untrue because it
    | |     + 197543 [buppcpp@ya o] Why does Ruby insist on using a Webboard instead of a regular newsgroup
    | |     | 197546 [halostatue@g] That impression is probably at the root of your errors here. ruby-talk
    | |     | 197549 [jesusrubsyou] I think utter and blatant misconceptions such as these are good reason
    | |     | 197576 [phil@ha el .] To be honest I wonder if some cause for misunderstanding isn't
    | |     | 197580 [tom@he me st] I think that rather than it being a problem of warnings or naming, it is
    | |     | 197718 [jesusrubsyou] Hmm... fair enough, but how could Andreas approach this?  One post per
    | |     | 197749 [james.britt@] Or replace the current page with one that has instructions on
    | |     + 197555 [curi@cu i. s] a third one just now reads (for anyone not following the other thread
    | + 196851 [f@an re s- .] Thanks.
    |   + 196854 [jesusrubsyou] Much gratitude from me for making these changes.  :)
    |   | 197318 [jesusrubsyou] It's difficult not to notice that sometimes posts from ruby-forum.com
    |   | + 197324 [jmg3000@gm i] My guess is that the folks who might post inflammatory messages
    |   | + 197330 [curi@cu i. s] here are some rules of thumb. i'm sure others could add more.
    |   |   + 197338 [phil@ha el .] I think a lot of that is due to certain people being very diligent
    |   |   + 197370 [jesusrubsyou] That may be the case, but I think "document + moderators" at the
    |   |   | 197398 [edder@tk sp ] Shall we first wait for a couple of weeks to see what the effect of the
    |   |   + 197470 [chneukirchen] - start new threads for new topics, don't just change the subject
    |   + 196855 [halostatue@g] Thank you. Hopefully, this will help.
    + 196226 [dave@bu t. d] Does anyone read all 4000 posts per month?
      + 196229 [halostatue@g] I try. ;) GMail makes it easier.
      | 196230 [hal9000@hy e] I also try.  :) I'd venture to say that nearly
      + 196234 [drbrain@se m] I'm writing tools to read my mailing list traffic for me and tell me
        + 196235 [vshepelev@im] Sound exciting. What is the principle, on which your tool selects
        + 196266 [hal9000@hy e] This reminds me of the "electric monk" of Douglas Adams. Just as

External application under Windows
196066 [Nuralanur@ao] ...
196092 [chris.hulan@] Posted via http://www.ruby-forum.com/.
196128 [Nuralanur@ao] ...
196149 [chris.hulan@] Your welcome, glad it helped

Ruby Weekly News 29th May - 4th June 2006
196074 [timsuth@ih g] Ruby Weekly News 29th May - 4th June 2006
+ 196076 [dblack@wo bl] David
| 196162 [james_b@ne r] I've noticed that the weekly news does not seem to include links for
| 196166 [ mfp@ac .o g] You can find all the links at
| 196233 [james_b@ne r] Ah so.  Thanks.
| 196298 [timsuth@ih g] I use links' "Save Formatted Document" feature to generate the postings. I'd
+ 196078 [rmagick@gm i] Thanks for doing this, Tim. It's always a pleasure reading your
| + 196095 [ml.chibbs@gm] ...
| | 196334 [rhkramer@gm ] +1
| + 196285 [gene.tani@gm] I want to add my thanks.  There's some great stuff in ruby land,
+ 196137 [rubyfan@gm i] I hate to nitpick, but comp.lang.ruby isn't independent by choice.
  + 196191 [hal9000@hy e] *sigh* Yes, I miss the gateway, too...
  | 196193 [james@gr yp ] I've emailed Dennis to see if I can get the source.  If I succeed
  | + 196200 [TimHunter@nc] Is this a service that can be contracted out to a business, or can it
  | + 196206 [james@gr yp ] Dennis is sending me the source in the next couple of days.  I'm
  |   196209 [james@gr yp ] I'm 90% sure I just found a host.  Give me a couple of weeks to iron
  + 196295 [timsuth@ih g] Thanks for the feedback. I wasn't really sure what had happened to