## 308072-313086

307854-314165 subjects 308294-341118
```
^ Re: [QUIZ] [SOLUTION] Symbolify (#169)
308072 [billk cts.co] Enjoyed the quiz - thanks!  Here are my solutions...

^ Methods with [] braces can't take block arguments?
308076 [vikrambkumar] I want to create a L2 cache object based on Hash.
308112 [jens.wille u] well, the problem is not that the method name has special

^ Factorials
308086 [adamman62 ma] I just started using ruby, and no matter how hard i try i cant do
308088 [serabe gmail] def factorial(n)
308147 [victor.reyes] The "Rubish" version of your factorial solutions appear to be much faster!
+ 308164 [davebass mus] Same problem here. But I figured out it's ideal for calculating
| 308167 [rick.denatal] I believe that Matz took the name from Smalltalk, where the equivalent to
+ 308190 [serabe gmail] enum.inject(initial) {| memo, obj | block }  => obj

^ Re: [QUIZ] Symbolify (#169) [SOLUTION]
308094 [ara.t.howard] # impl

^ What is the complexity of find_by_name ?
308099 [yaronkretchm] I was wondering whether find_by_name has linear complexity O(n) with n
+ 308101 [no spam.plea] Assuming you're talking about Rails and ActiveRecord (this is a *Ruby*
+ 308129 [phlip2005 gm] def test_find_by_name_is_efficient

^ bug involving condition variables
308103 [vjoel path.b] The following code generates a ThreadError ("not owner", raised in
+ 308104 [vjoel path.b] ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
+ 308114 [nobu ruby-la] It seems like a bug of ext/thread in 1.8.6, and 1.8.7 doesn't
308174 [vjoel path.b] I filed a bug report (#275), in case this can be fixed in 1.8.6 for

^ Raw Sockets for packet sniffing
308107 [fdmanana gma] I am trying to use, through 100% Ruby code, Linux Raw Sockets for packet

^ the Regular exp read from file not matching !!
308108 [jayanjacob g] I am trying to read the syntax(here the regular expression) frpm a file.
+ 308141 [sandor.szuec] That RegEx: /^[0-1]{1}[a-zA-Z]{1,25}\$/ doesn't match ','.
+ 308223 [jayanjacob g] Sorry for the typo error in the earlier mail , I did try "1abcd" on
+ 308224 [jayanjacob g] I replaced the code with
308245 [sandor.szuec] In my opinion it's a String vs. RegExp problem.

^ date format
308111 [sijo maxxion] I have code
308113 [botp delmont] RnJvbTogc2lqb0BtYXh4aW9uLmNvbSBbbWFpbHRvOnNpam9AbWF4eGlvbi5jb21dIA0KIyAgICAg
308121 [sijo maxxion] Thanks for the reply
+ 308218 [botp delmont] RnJvbTogc2lqb0BtYXh4aW9uLmNvbSBbbWFpbHRvOnNpam9AbWF4eGlvbi5jb21dIA0KIyBDb3Vs
+ 308230 [jazzezravi g] a="15/01/2008"
308232 [_mwryder wor] or you could use a = a[3,3]+a[0,3]+a[6,4]

^ #define like with ruby
308120 [jyri_vesalai] testdata[current_line + 1] ...
308133 [phlip2005 gm] Just a C tip: I thought C supported global constants, enums, and inline
308138 [jyri_vesalai] Thanks a lot!
308151 [phlip2005 gm] Sorry. If you questions for a decade on news:comp.lang.c++ , certain things

^ [NEWBIE] Help with class instance variables
308124 [ittay.dror g] #<Gem::Platform:0x..fdbdf0696 @cpu="x86", @os="linux", @version=nil>
308127 [dblack rubyp] The problem is that the instance variables you're initializing belong

^ Re: Help with class instance variables
308131 [ittay.dror g] 1. If I want to add an instance variable to an object of class C I can
+ 308135 [rick.denatal] class C
| 308137 [ittay.dror g] Let me rephrase, trying to to use any terminology. Let's say I have a
| 308163 [rick.denatal] Well, it depends on just what you are doing with the cache.
| 308165 [ittay.dror g] Thank you very much!
+ 308136 [dblack rubyp] class C

^ Re: Tidy segfault on Linux
308132 [robertfx gma] we ran into the excat same issue Lee described in

^ Re: Newbie question - how to get current directory into a va
308162 [davebass mus] Works for me (WinXP, Ruby 1.8.6-111).
313086 [sean simplev] Thought I'd keep this one going!

^ Re: Texture/image similarity with ruby? (computer vision)
308143 [AEtzold gmx.] Dear Ara,

^ Introspection question
308145 [srijayanth g] a = Hash.new
+ 308149 [dblack rubyp] The hash has no knowledge of how many identifiers refer to it.
+ 308197 [ryand-ruby z] What you're asking has what we call a "bad design smell"... I have
308222 [srijayanth g] Thank you both.

^ regexp with gaps
308153 [egrasso.rb e] string. For this I'm using a loop that uses str.index(pattern,
308156 [phlip2005 gm] \w{12,}
308225 [egrasso.rb e] Mmmmm... nop. I think I didn't explain the idea very well... I'm writing a
308243 [AEtzold gmx.] you could make use of the McIlroy-Hunt longest common subsequence (LCS) algorithm,

^ Text Editor
308154 [jacob.grover] editor for at least Ruby because I've been teaching one of my friends
+ 308157 [cdemyanovich] You can write Ruby code in any text editor. Is your friend not using one,
| + 308188 [Reid.Thompso] gobby is a free, collabortive editor also...
| | 308189 [Reid.Thompso] just noticed that one of the screenshots is of ruby code
| + 308217 [jacob.grover] I've heard of Subethaedit, it's great when I was taught Ruby (A few
+ 308159 [ninja slapha] You do realize that there's nothing magical about a "ruby" text editor, right?
| + 308178 [cmmagid gmai] ight?
| | 308216 [jacob.grover] Thanks!
| + 308228 [jacob.grover] Oh, thanks. I never knew you could using a normal everyday editor to
|   308331 [davebass mus] I generally use Win32Pad (an improved Notepad replacement) on Windows,
+ 308202 [rubynando ya] When you install "Instant Ruby" you get SciTE, a good editor with syntax
308205 [nospam7272 m] I guess it would be helpful if we knew whether your friend has a Mac or
308207 [tommy.nordgr] Or Smultron, Emacs.app, AquaMacs EMacs, Alpha
308226 [jacob.grover] I've got that, but thanks for the suggestion.

^ Timer program
308155 [jacob.grover] I've been looking to enhance a timer program I've made. It's extremely
308166 [davebass mus] Do you mean combine the MP3 file with the program? You could append your

^ Shoes Toolkit
308158 [jacob.grover] I recently was using the Shoes universal app. I'm guessing it's very

^ Error handling with command calls
308161 [Stefan.Schmi] I'm trying to rewrite a Bash shell script with Ruby.

308172 [me michaelbo] I'm building an application that has to branch out and call about 10
+ 308173 [vjoel path.b] #join is definitely a good idea, because otherwise (as you observed) the
| 308176 [me michaelbo] Joel,
+ 308191 [erikveen gma] In plain Ruby, you might want to rewrite this to a more

^ Do we "own" XML namespace?
308175 [transfire gm] Little bit of debate going on with LibXML, and I'd like to get some
308192 [martindemell] I like this one - it lets you use the XML namespace without
308213 [cfis savagex] Some thoughts...
308219 [matt tidbits] Charlie - sounds great, just yell real loud when the gem update

^ AutoIt: Any support for OCR?
308177 [anukul.singh] I am automating my set top box, having a Client app which has a remote

^ open3 throws exception when preceded by fork
308180 [7ricky gmail] I am attempting to create a daemon that (when required) spawns off
308195 [ara.t.howard] require 'rubygems'
308212 [7ricky gmail] Thank you for you reply. Unfortunately I am unable to utilize the
308214 [ara.t.howard] the tgz files are on rubyforge.  just unpack and run

^ Win32/Process when create a process, how to pass data
308181 [qi.lu skywav] I am working on moving a server code from Linux to Window XP. I need

^ how to loop through two arrays in parallel
308182 [go_mitchell ] I have two arrays from a form.
+ 308183 [damnbigman g] product_quantity = {}
| + 308186 [s.korteling ] orderlist = products.zip(quantity)
| | 308193 [micathom gma] If you don't want to create a new array but work on the values you
| + 308187 [go_mitchell ] Thanks Greg.
+ 308184 [Kevin.Brown ] charset="iso-8859-1"
| 308198 [go_mitchell ] I like this one. For a beginner this is easiest to follow.
+ 308185 [konstantin.m] What are you going to do with it. Probably I hash would be a better
+ 308196 [rick.denatal] %w(a b c).zip([2, 4, 3]).map {|product, quantity| "#{quantity} #{product} on
308199 [go_mitchell ] Rick I checked out your blog. Pretty interesting stuff.  Over my head

^ CGI anomaly associated with access to a Rails Active Record outside of rails...
308194 [xcampanoli g] So, I'm not sure I will have the energy to do other than just mention
308474 [xcampanoli g] Followup on this, though instantiation / object variables initiated in

^ array of hashes (finding value)
308200 [nateleavitt ] I'm just looking for other possible solutions.  Sorry, this is kinda a
308201 [damnbigman g] With the construct you have there it would be faster to just store the names
308203 [nateleavitt ] Thanks for the reply.  Yes, I am working in rails :)  It just seems
+ 308204 [martindemell] Where did @invoices come from in the first place? If it came from the
| 308209 [nateleavitt ] Yeah... sorry.  I actually get the collection through an xml-rpc call :)
+ 308206 [s.korteling ] invoice_set=@invoices.select{|invoice|invoice[:id]==params[:contact_id]}

^ shoes toolket
308210 [redman acces] I have been trying to write a few programs with shoes.
308221 [redman acces] I have figured it out.

^ IO#gets with regex
308211 [morrisbroder] in ruby 1.8.7, IO#gets takes a seperator string as argument. i suggest
308328 [sepp2k googl] That'd be problematic as its not always possible to accurately apply a regex

^ Syntax Checker that's better than the normal syntax checker
308227 [jacob.grover] I've been using the stupid built in syntax checker, it's been making
308229 [ben bleythin] Uh... what?
308231 [vjoel path.b] Maybe he's referring to ruby -c ?
308237 [ben bleythin] Ah, that's a good point.  And further perhaps he means "gives better
308332 [davebass mus] ruby -cw  surely!

^ Proc argument names instead of arity
308233 [macarui gmai] client for ruby and I want it to be as close as using SCLang.
308235 [rogerpack200] Appears that there is.
308236 [macarui gmai] I will check it out
308238 [rogerpack200] Another option is to pass args as an array
308239 [macarui gmai] Yeah, extracting the arg names is the sclang solution but is not the
308301 [macarui gmai] Anyway I would like get the arg names for a proc. Is it doable with
308310 [macarui gmai] adds a to_sexp method to proc

^ array ending syntax question
308234 [rogerpack200] irb(main):001:0> [1,2][2..2]
+ 308257 [fedzor gmail] Yes, because array indices start at 0. So the highest index in the
+ 308258 [alexg rugged] From the Pickaxe: If the start index equals the array size and a
308267 [frederick.ch] It sort of makes sense in that in an n item array n is actually a

^ Is it possible to dynamically extend Test::Unit test cases?
308240 [monch1962 gm] I've got some "normal" test cases that look like this
+ 308250 [phlip2005 gm] Why? Just curious...
| 308255 [monch1962 gm] Thanks Phlip,
| + 308260 [bret pettich] David,
| | 308268 [aidy.lewis g] nt
| | 308283 [monch1962 gm] Thanks Bret and Aidy
| | 308364 [aidy.lewis g] front
| + 308304 [nicksieger g] If you haven't already, you might look at systir [1] -- does almost
|   308330 [aidy.lewis g] The issues I have with the more procedural frameworks is that you are
+ 308303 [ikari.shinji] require 'test/unit/ui/console/testrunner'

^ Reading Web Feeds (RSS, Atom) in Ruby - Pros and Cons of Web Feed Libraries
308241 [geraldbauer2] I've published a mini tutorial on how to read web feeds (RSS, Atom)

^ Displaying array elements in order
308244 [gananapragas] for example
308246 [mikael hoilu] If that's happening, the array is ordered randomly before the `for` =20
308247 [gananapragas] Before the for loop also i checked but it is displaying in random order

^ Extracting range of lines
308249 [tmarciniak g] are there a ruby equivalents to perl's /regex/ .. /regex/ and /
+ 308251 [simon.baumga] the link is not working (i would need to sign up to the forum
+ 308253 [botp delmont] # are there a ruby equivalents to perl's /regex/ .. /regex/ and /

^ autogenrated table
308252 [babu038 gmai] Please can any one for auto generated table,tr,td according to the query
308256 [shashank_hi ] You could use nested loops...
308322 [jazzezravi g] May be thiese lines helpful for u.

308254 [Guillermo.Ac] I have made an multithreaded algorithm that triggers around a hundred=20
+ 308263 [vjoel path.b] Why are you sure it is the database? If your other version (the
+ 308266 [ara.t.howard] 1) STDERR.puts message
308319 [Guillermo.Ac] def mymethod

308261 [christian.ke] Hey!
+ 308418 [christian.ke] res = conn.request(req, @data)
+ 308419 [robert.dober] Install Linux ;) -at least we could trace this easily, hopefully some
308487 [christian.ke] Aktive Verbindungen

^ Array.drop doesn't work
308264 [chen_li3 yah] I try to use #drop to remove several elements from an array but it
+ 308265 [frederick.ch] Seems like this was added in 1.8.7 (if you look at the docs for 1.8.6
| + 308340 [davebass mus] arr = n.times { arr.shift }
| | + 308343 [dblack rubyp] #times returns its receiver, so that would set arr to n.
| | + 308542 [ninja slapha] class Array
| | | 308567 [caduceass gm] If the drop method alters the array, then you would have to modify
| | | + 308568 [robert.dober] Is it just me, or is there general confusion?
| | | | + 308572 [mike cargal.] In Ruby 1.9, the selection methods described previously are augmented
| | | | | 308573 [robert.dober] Please refrain from top posting especially when the stuff you are
| | | | + 308577 [caduceass gm] I figured I was right the first time.  It's nice to have some
| | | + 308586 [ninja slapha] Alright, I just tested it out in irb1.9. It seems to not alter the array, and
| | + 308566 [caduceass gm] Like David B. said.  Also, if you left off the assignment, it would be
| + 308346 [dblack rubyp] It's a backport from 1.9. I think that's mostly what 1.8.7 is. It's
+ 308288 [ikari.shinji] Here is the Changes List ,and Array#drop included

308269 [redman acces] I am running ubuntu 8.04 and when I try to run the mp3 player for shoes
308274 [gdprasad gma] Check whether the following vlc plugins are installed

^ [ANN] Lone Star Ruby Conference 2008 - Registration Now Open
308273 [jimfreeze gm] The second annual Lone Star Ruby Conference is heating up and right

^ Problems with win32 Process.kill
308275 [bob arkfrien] I have followed the discussion for getting the win32 methods
308285 [djberg96 gma] This isn't a problem with win32-process. It's an architectural issue
308290 [bob arkfrien] That was why I was baffled by all of this but your explanation makes

^ Immediately print a string on stdout without new line?
308278 [janus urban-] print "Processing... "
+ 308279 [fedzor gmail] print "Processing... "
| + 308281 [janus urban-] Thank you! That does the trick...
| | 308282 [damnbigman g] Until reading fedzor's post I had completely forgotten that different
| + 308287 [tim.pease gm] Another option ...
|   308334 [davebass mus] Another option: print your message to stderr, not stdout. Stderr is
+ 308280 [damnbigman g] def processing

^ erb and rhtml templates?
308284 [labyrinthins] I've got a website w/ lunarpages, and I've been using erb to do some
308522 [phlip2005 gm] Figure out where your server sticks your error*log file (either error.log or
308735 [labyrinthins] Actually, that is from the error log. It is no more informative than

^ Re: Calculate last day of month
308289 [fgjsp_p 163.] class Date
308337 [ruby anthrop] It's easier than that.
+ 308341 [lloyd 2live4] Ok, I know that I am going to be smacked for this, but we DO know how
+ 308347 [bill.walton ] Why override Date at all when we've got
308350 [ruby anthrop] Because this is the ruby list, not the rubyonrails list.
308359 [bill.walton ] Oops ;-)  Should have checked the header.  My bad.

^ Is there a way to call include for an object instance?
308291 [olsen.chris ] I need to be able to create an object and, based on the param that I
+ 308293 [transfire gm] Couple of ways. One is to use the singleton.
| 308295 [olsen.chris ] Thanks so much. To be honest I have no idea what the  (class << self;
+ 308297 [rubytraining] You can call extend on an instance to mix in a modules instance
+ 308315 [ikari.shinji] you should put module(s) into class ,to ensure class Stats has the
+ 308355 [olsen.chris ] That also works well.

^ check my class
308292 [misterparker] Hey i'm super new at ruby, This is my first class attempt. can i copy
308296 [ttmrichter g] Just as a general guideline for the future, if you have a question like
+ 308299 [srijayanth g] attr_reader :cash, :salesTaxPayable
| 308305 [ttmrichter g] Doh!  Good catch.  I didn't see that the accessor was differently named
+ 308302 [misterparker] =A0It
308317 [frederick.ch] Because your file probably used tabs (the convention usually to use
308344 [misterparker] On Jul 16, 2:23 am, Frederick Cheung <frederick.che...@gmail.com>
```