357001-368700 subjects 357463-375227

What is the best exception to use for bad Data State?
357202 [xeno.campano] I don't want to use "ArgumentError" as this is a matter of data that may be
357213 [shortcutter@] Can you provide more context information?  When do you want to throw?
+ 357234 [mat@pa ch co] Sounds like Xeno is looking for something equivalent to Java's
+ 357241 [xeno.campano] For now I am using "ScriptError".  I was using "SyntaxError", but I think that
  + 357242 [b.candler@po] raise NoMethodError perhaps?
  + 357243 [ben@bl yt in] nk
  + 357272 [cmdicely@gm ] From what I've seen, it seems more idiomatic in Ruby not to define
    + 357278 [albertschlef] Documenting a method somewhere in the parent docs is like putting a
    + 357279 [albertschlef] But NoMethodError is also raised if you have a typo in your code. So

Rmagick DNG
357203 [jonsdenni@gm] I am using RMagick to process photos that are in the DNG format.
357392 [rogerpack200] Could re-post this to their rubyforge forum.

Subtracting string arrays
357204 [mr.novell@gm] I am having am issue subtracting two arrays with string elements.
+ 357205 [gwtmp01@ma .] => ["StringA", "StringB", "StringC"]
+ 357244 [diegosoreira] ...

Sorting numbers.
357216 [sys1@sc .o g] fooone,22,114,66,125,footwo
+ 357219 [shortcutter@] 1. if you want to process the data further, first convert values from
+ 357231 [raul.c.jara@] Why to you feel .to_i isn't appropriate.
+ 357258 [sys1@sc .o g] Thanks Robert and Raul. Both solutions worked.

Ruby/TK: Versatile file-chooser dialogs?
357218 [a99.googlegr] does anybody know of more versatile dialogs than the standard
+ 357248 [rogerpack200] They're probably there, but only if you dig into Tk.
| 357263 [a99.googlegr] and
+ 357276 [nagai@ai ky ] For dir, :initialdir option may be useful.
  357307 [a99.googlegr] I've started to write my own dialog(s). Hope I'll finish sometime ;)

[ANN] unicorn 0.96.1 - leak fix for Rainbows!/Zbatery
357221 [normalperson] First off, this memory leak doesn't affect Unicorn itself at all

[ANN] Rainbows! 0.90.2 - leak fix from Unicorn
357223 [normalperson] This release depends on Unicorn 0.96.1 for an updated

[ANN] Zbatery 0.1.1 - leak fix from Unicorn
357224 [normalperson] Unicorn had a memory leak that didn't affect Unicorn, but only

[ANN] clogger 0.3.2 - share a hacker, share a bug
357225 [normalperson] Yes, I managed to make the same mistake here I made in Unicorn!

[ANN] posix_mq 0.3.1 - Ruby
357228 [normalperson] Almost forgot about this one, I have a short attention span

Getting started with the C API
357235 [marvin@re ta] Greets,
+ 357237 [mo_mail@on h] Even if you don't learn from it, the PickAxe Edition 1 Online will give
+ 357238 [mat@pa ch co] If you download the Ruby source, there's a file called README.EXT
| 357267 [marvin@re ta] That's exactly the kind of thing I was looking for.  On its own, it's
+ 357239 [unexist@do f] ...
  357268 [marvin@re ta] Ah, that's the README, html-ified.  Curious that ruby-lang.org doesn't give it

Adding more ObjC code to macirb
357236 [hresquiveloa] If I want to add more Objective-C code to the MacRuby interpreter
357240 [hresquiveloa] question appears addressed to the MacRuby Team. But if anyone knows the

Generating all possible combinations of a 5 digit pattern.
357249 [ no@sp m. om] This is probably childs play for most of you..  But I lack the
+ 357250 [usenet-nospa] That sounds like five bits.
| 357252 [ no@sp m. om] that is very interesting and I hadn't even considered using bits. Know
| 357260 [usenet-nospa] I learned it before "links" existed, so I don't know.
| + 357262 [ no@sp m. om] Thanks again, for that.
| | 357269 [eregontp@gm ] (["B", "C"]*5).combination(5).to_a.uniq.map(&:join)
| + 357270 [shortcutter@] I'm sorry, but this is overly complicated.  If I want to know whether
|   357271 [usenet-nospa] Oh, neat!
|   357275 [ no@sp m. om] Wow, maybe its just the size of your posting, but that looks even more
+ 357266 [josh.cheek@g] Here is one, also based off of Seebs' insight
  357277 [ no@sp m. om] I know I attrociously used the word "digit"  in the title, and I think
  357281 [reid.thompso] This must be what you were talking about????
  357282 [ no@sp m. om] Yes that is it.   I played around with it but I got a lot of dupes,
  + 357283 [ no@sp m. om] frame comes directly before a C frame)
  + 357284 [vieuxtech@gm] You have only two letters, C and N. That is like have only two digits,
    357296 [ no@sp m. om] Geee, now I feel -real- dumb.   I appreciate that output, Sam.
    357432 [cidza@ti .i ] one more solution

Question about load(). WasRe: [ANN] envjs rubygem 0.1.1
357251 [ed.howland@g] Steven,
357255 [smparkes@sm ] Uh ... moderately? I didn't purposefully break anything and I run all =

Delegating testing to another class
357254 [the.rodent.o] This is probably funky.. :-)
357259 [the.rodent.o] t1.tCase = self

All attempts to install gems hang
357265 [public@id ho] For a couple weeks, I haven't been able to install any gems on my
+ 357286 [rogerpack200] Maybe it's using an "old version" of some of the libraries or what not?
+ 357290 [matt@ti bi s] I'm sitting here running Snow Leopard (and TextMate and PathFinder and
+ 357413 [bretweinraub] Hey me too!  I've been through a maze of a 1000 twisty passages; all
  357416 [bretweinraub] I've managed to get some progress (I can actually install a gem) if I
  357425 [public@id ho] Interesting, I may have to try that.
  + 357455 [matt@ti bi s] Well, that's a good sign! I'm glad you tried my suggestion on this,
  + 357466 [bretweinraub] Although I never actually was able to put my finger on something that
    358753 [  mbm@hi .s ] So, for me (and my students) who can't switch to bridged due to the
    + 358756 [bretweinraub] Maybe you can pick up the torch?  I have some more suggestions on this
    + 358795 [bretweinraub] - yes use gem:freeze should allow you to get the app working somewhere

Q: will this always work: rescuing with non-Exception classes
357274 [onepoint@st ] I wondered  whether the  clause rescue would  accept any  modules, not
+ 357280 [transfire@gm] , not
+ 357292 [burke.libbey] Interesting idea. Seems to work pretty much everywhere.
+ 357293 [onepoint@st ] (Following up to myself to summarise)

Searching in arrays
357297 [toth@kw gb .] Dears, I have two .txt files. I read both into arrays and I would like
357303 [astounding@g] ### CODE BEGINS ###
357312 [toth@kw gb .] Aaron, this is BRILLIANT. Exactly does what I expected.
357374 [shortcutter@] Interesting.  I would have thought you wanted to match all lines that

Ruby equivalents to SciPy, NumPy
357298 [alexander@je] I want to use Ruby to do some scientific computing for university and
357299 [ralf.mueller] I have quite good experience with the bindings to Gnu Scientific Library

building ruby on rails
357300 [mamfelt@gm i] I have downloaded ruby-1.91-1-p376, configured and built
+ 357324 [mamfelt@gm i] I have come a bit further, but not found a solution.
+ 357357 [b.candler@po] This means that ruby zlib library wasn't built when you were building
  357450 [mamfelt@gm i] My "solution" was a lot simplier. As all the files were there but

what's the nearest ruby equivalent to waf?
357301 [martindemell] using waf, a python build tool, instead of autoconf and make, to build
357302 [unexist@do f] ...
357305 [martindemell] thanks, that's pretty neat. i'd forgotten about mkmf.

357304 [raul.c.jara@] String#toutf8 ??? string
357306 [ben@bl yt in] Sure :)
357308 [raul.c.jara@] Thanks for the reply.  Any ideas as to why, when I try that out, I get a
357310 [ben@bl yt in] It appears to be a method that comes from the Kconv module.  Trying to
357311 [raul.c.jara@] That was it.  Many thanks.  What an unfortunate quirk of the

Mon proprety isn't a string?
357313 [gregorylepac] I would simply like to remove spaces of the property "name" before save
357315 [Rob@Ag le on] before_save will catch both create and update
357318 [gregorylepac] Thanks Rob
357321 [b.candler@po] def remove_spaces

Theory behind proof of concept for  automatic IVTC decimation
357314 [ no@sp m. om] This relates to my video editing project.   Now that I have a list of
+ 357316 [ no@sp m. om] Sorry, more typos  against..  in the numberings  when talking about
+ 357325 [reid.thompso] change this example
+ 357333 [ninja@sl ph ] In other words, you want to start reading once you get to [MATCHES].
  357387 [ no@sp m. om] Thanks for those two replies.  That should set me on the right track.
  357546 [ no@sp m. om] I think I've made some great progress so far..   At least,  I've got

can't convert Symbol into String
357317 [ralphs@do 32] I'm getting the following error
357320 [b.candler@po] This looks like you are working with Rails. Rails is not Ruby. Ruby is a
357322 [ralphs@do 32] Brian,
+ 357326 [desantis.mau] That answers to your problem: it's a Rails matter. Likely, text_field
+ 357328 [xenogenesis@] When the method in question is expecting a String and not a Symbol (as
| 357332 [ralphs@do 32] Ok ... this is for the next person who has this error and is/was as confused as I was.
+ 357350 [b.candler@po] In general, Ruby will never convert a Symbol into a String.

Square brackets
357323 [sys1@sc .o g] I'm using Ruby 1.9.1 and sqlite3 with sqlite3-Ruby (1.2.5)
+ 357327 [hassan.schro] => [["3"]]
+ 357356 [b.candler@po] A SQL select in general returns multiple rows, each of which has
+ 357378 [sys1@sc .o g] Hassan and Brian, thanks for your answer.
  357379 [Rob@Ag le on] That's because the behavior of Array#to_s changed in 1.9. It used to
  357390 [sys1@sc .o g] Rob, thanks for your explanation. I feel more 'comfortable' now.
  357437 [b.candler@po] $ irb --simple-prompt
  357445 [sys1@sc .o g] Brian, thanks for your detailed explanation.

Compare and delete element from an array
357329 [gregorylepac] I try to compare an arroy of Tag and an array of string. I would like to
+ 357330 [ryand-ruby@z] display
+ 357331 [astounding@g] x.name =3D=3D tag
| 357335 [gregorylepac] Even if i remove the puts, it still doesnt remove anything.
| 357340 [astounding@g] You call the "delete_if()" method on the "tags" variable--where is
| 357342 [gregorylepac] Thanks for the explanation!
| 357343 [josh.cheek@g] Sounds like a Rails/ActiveRecord question, you'll probably have more luck o=
+ 357345 [shortcutter@] This algorithm has roughly effort O(n^2) because you compare all pairs

'def', but with a closure
357334 [albertschlef] @cars.each do |owner, model|
+ 357337 [nagai@ai ky ] e.g.
| 357338 [josh.cheek@g] Is there some reason why Ruby hasn't made it possible to just do
| 357339 [nagai@ai ky ] e.g.
| 357411 [albertschlef] Thanks. That's useful.
| 357431 [b.candler@po] I believe it's slightly more complex than that.
| 357433 [b.candler@po] Note that instance_eval sets the current class to the object's singleton
+ 357347 [shortcutter@] You can at least shorten it a bit
  + 357355 [b.candler@po] You can use a block (non-string) eval, which isn't quite as short but
  | 357414 [albertschlef] @cars.each do |owner, model|
  + 357412 [albertschlef] It has another disadvantage: It's possible to imagine a Ruby

[ann] rsec - parsec for ruby1.9
357344 [usurffx@gm i] I just made a small parser combinator library for ruby1.9 (sadly it's
357436 [usurffx@gm i] # Just added another example: a Scheme interpreter.

how to add a custom "tag" to markdown
357346 [james@le el ] In a project I need to add some kind of custom "tag" to markdown which =

[ANN] io_splice - zero-copy pipe I/O for Linux
357348 [normalperson] The splice family of Linux system calls can transfer data between file

[ANN] kramdown 0.5.0 released
357354 [t_leitner@gm] ## About kramdown

[ANN] webgen 0.5.11 released
357360 [t_leitner@gm] Hey everybody!

Unsubscribe Doesn't seem to work
357363 [ejbnorfolk@y] ...
+ 357365 [b.candler@po] 1. What address did you send the E-mail to?
| 357388 [ no@sp m. om] I could be wrong in this case, but when I have ever unsubscribed to
+ 357468 [walton@vy er] ...

357366 [mido.peace@g] I have a trouble using the ConditionVariable and Mutex Class ,
357371 [shortcutter@] Not without the full code.  What you showed looks OK.
357373 [mido.peace@g] require 'thread'
357380 [shortcutter@] Why do you place that inside the class?  This is a global setting.
357394 [vikkous@gm i] It depends on what you're using the semaphore for. If it's to be used
+ 357429 [shortcutter@] Right you are.  Although I'd say that a condition variable is probably
| 357482 [vikkous@gm i] It may be, but I've never understood condition variables properly.
| 357488 [shortcutter@] Ah, my posting did not make it through the gateway - probably because I
+ 357435 [mido.peace@g] Thx for your Help !!

Parallel assignments vs. Serial assigments
357382 [thinkersplay] Hey all
357383 [thinkersplay] (My results show that parallel assignment is slower in this test)
357384 [jgabrielygal] I think it might be because the parallel assigment creates an array
357385 [jgabrielygal] I have a class Three cause I was also testing this other form, which
357471 [shortcutter@] However it is done technically, parallel assignment needs more space=20
357473 [jgabrielygal] use

[ANN] Red Dirt RubyConf:  Call for Proposals
357386 [james@gr ys ] Just a quick reminder here folks.  Our Call for Proposals for the Red =
357389 [nicksieger@g] irt RubyConf (http://reddirtrubyconf.com/) is now half over. =A0You only ha=
357391 [james@gr ys ] Dirt RubyConf (http://reddirtrubyconf.com/) is now half over.  You only =

Newbie needs help
357397 [guidjos0x00@] Heya fellas. I've coded C, Java and perl for a while now, but I'm
+ 357402 [wruyahoo05@c] In Ruby, numbers without a decimal point are treated as integers. The
| 357409 [guidjos0x00@] Now that's a useful post. Rob's was nice too, and I appreciate it guys.
| 357443 [wruyahoo05@c] Thank you. By the way I think I ment ** and / in the remark about
+ 357403 [marnen@ma ne] And what is the error?  You neglected to say.
| + 357406 [Rob@Ag le on] Marnen, that's probably because puts only adds a "\n" if it needs to
| | 357449 [marnen@ma ne] Well, yeah.  That seemed like an odd place to put it, though.
| + 357408 [guidjos0x00@] I should point out, mr. Koser, that your attitude does nothing but
|   357452 [marnen@ma ne] I gave you help and encouragement to use the Ruby language better.  I
|   357459 [aldric@tr vo] Because people hate being told they are morons! :-)
|   357460 [marnen@ma ne] True.  I didn't think I was doing that.
+ 357419 [albertschlef] Note that "1/2" gives zero in Ruby. William Rutiser explained this and

unable to go "left" of an array, but yes "right" of an array
357398 [rogerpack200] Is this expected?
+ 357401 [botpena@gm i] i wont answer your question.
+ 357457 [colinb2r@go ] My understanding is that what decides whether a slice or nil is returned

OCRA with Prawn (or other libraries that require non-Ruby files)
357399 [echristopher] I'm trying to package a script into an .exe using OCRA. My script uses
357405 [shawn42@gm i] I was wondering the same thing.  I was contemplating a rake task to compose

Ruby "Save Game" function
357407 [mikejoebro@y] I am currently working on a text-based RPG and I wanted to implement a
+ 357420 [billk@ct .c ] For starters, I'd suggest looking at PStore and YAML::Store.
| 357438 [mikejoebro@y] Bill,
| 357442 [cbrueggenolt] you could try out MongoDB or CouchDB as well.
+ 357574 [kozgun@gm il] May I suggest "sequel + sqlite"? http://sequel.rubyforge.org/

filepath in identify for paperclip cygwin
357410 [danbus@sh nz] I am using paperclip with imagemagick and i get the error
376389 [wtdnielsen@g] I had the same problem, and it took me 3 weeks to solve.
376399 [luislavena@g] Question, are you using cygwin Ruby or native Ruby? because
376433 [shortcutter@] No, you want

Find by association table
357417 [gregorylepac] I did a the method below that return all students who has the method
357418 [gregorylepac] I correct myself, but there is still probably something cleaner possible
357421 [josh.cheek@g] Based on the similar topic to your previous post, which seemed to be a Rails
357422 [gregorylepac] It is a he-has-and-belongs-to-many-association
357423 [josh.cheek@g] Have you looked at the acts_as_taggable plugin?

deploy issues
357426 [muchira@gm i] Hey guys, does anyone know what causes the "don't know how to build
357427 [mo_mail@on h] Should mean that the Rakefile which has the descriptions of the specific

Ruby + git +ssh keys
357440 [rkononov@gm ] 1) write ssh key into ~/.ssh/id_rsa file and execute "git clone" command

Dia 1.1 released!
357446 [rob@fl wo .i] Hey
357451 [djberg96@gm ] Looks interesting. I'm curious about the name, though. When I think of
357453 [rob@fl wo .i] Dan --
357909 [rob@fl wo .i] Dia 1.3 was released a few days ago, and introduces some convenience
357911 [josh.cheek@g] school that includes functionality similar to codepad.org and javabat.com,
357914 [rob@fl wo .i] Josh --
357915 [rob@fl wo .i] Posted via http://www.ruby-forum.com/.
357916 [rob@fl wo .i] Another mistake I made, this is the exception that actually gets raised
357923 [josh.cheek@g] Thanks for the feedback, Robert. I won't be able to play with it for a bit
357978 [rob@fl wo .i] Josh --
358024 [josh.cheek@g] getting a NullPointerError
358026 [rob@fl wo .i] Hmm, I haven't seen that before but I think I know what it is. I think a
358027 [rob@fl wo .i] Josh --
+ 358037 [josh.cheek@g] Thanks, Robert. I still get the same error, though. Tomorrow (Thurs), I'll
+ 358039 [rob@fl wo .i] Josh --
  + 358066 [josh.cheek@g] Wanted to say thanks to Robert, who sat down with me and helped resolve the
  + 358067 [rob@fl wo .i] The bug reported by Josh Creek on 10.5 has been fixed in Dia 1.4.pre.2.