368332-370552 subjects 368757-369742

create dinamically hashes from string
368508 [free3zone@gm] the data contain in the cookie are grouped by ";" and every group have a

Avoiding eval
368510 [wagner.andre] Hey all,
368511 [shortcutter@] a_class = str.split('::').inject(Object) {|cl,n| cl.const_get n}
+ 368513 [wagner.andre] Well, sure. That's a good point. But now you're taking 3 times as long as
| + 368516 [wagner.andre] Err, I think I wasn't very clear in my last email, so I'll say it in a
| + 368517 [shortcutter@] Please do not top post.
+ 368540 [josh.cheek@g] (see method constantize)

Name that method!
368514 [transfire@gm] ...
368515 [wagner.andre] I'll vote for parent_namespace.
368528 [b.candler@po] Module#enclosing_module ??
+ 368543 [robert.dober] (+1)
+ 368557 [eregontp@gm ] I prefer #enclosing_module since the "namespace" is a Module.
| 368559 [transfire@gm] def constant(const)
+ 368558 [transfire@gm] ...
  368560 [robert.dober] But a class is a module, right? Although more exactly one could argue
  368573 [transfire@gm] Your right it is, and that should suffice, though I recall matz once

Parameter passing
368520 [ajfrenzel@we] Is it possible, to pass local variables by refrerence to method?
+ 368525 [cmdicely@gm ] There is no way to do exactly that in Ruby. If you pass the name of
| 368526 [ajfrenzel@we] Thanks for your reply. I'll think about another way to solve my problem.
| + 368529 [cbciv@ya oo ] This forum is gatewayed to the ruby-talk mailing list and
| + 368547 [shortcutter@] Interestingly I cannot remember having felt the need for C++ like call
|   368549 [ajfrenzel@we] Exactly. I have a lot of experiences with C/C++ und ruby is a very
|   368550 [ajfrenzel@we] Interestingly, the webmaster also does'nt like to publish his address to
+ 368669 [rogerpack200] You could pass it as an array

default ruby lib path "$:" problem
368521 [juanandrade1] I am trying to install and run ruby from rpm but I am missing ruby
368523 [luislavena@g] Please provide more information about Linux version you're using and
368524 [juanandrade1] Running

love me
368532 [2011.love.me] 1st step

Downloading corrupted files
368548 [nanjung@se n] I have created small program to download files from website. I am using
368613 [justincollin] Try it with open(replay_name, "wb") to open the file in binary mode.
368636 [nanjung@se n] Wou, thanks a lot :)

how to rewrite a curl request into a NET::HTTP one ?
368554 [yves_dufour@] I have a curl request (to upload a file) which is running weel in the
368555 [ammarabuali@] ...
368565 [yves_dufour@] Thanks a lot Amar,  could not get it right ...  I switched  to curb  (

Ruby Versions in Common Use (Or, Can we bury 1.8.6 yet?)
368562 [transfire@gm] I am curious if Ruby 1.8.6 is still widely used? Have most people made
368621 [brabuhr@gm i] "one of the issues that we have been working on ... we are still stuck

[ANN] New Ruby IDE discussion group formed.
368563 [ed.howland@g] To pump up the volume on discussions around IDEs that do Ruby and have

initialize instance variable problem
368564 [cameron1inm@] Why does this return nil for @city?
+ 368567 [jeanjulien.f] Because when you use @city outside a method definition, it is an
| 368586 [cameron1inm@] I get what your saying,
+ 368587 [josh.cheek@g] This is basically what Jean said, but I figured it might be easier to follow
+ 368589 [shortcutter@] Others have identified the basic issue (your puts statement accesses a

wxruby: clearing and replacing contents of a frame (panel?)
368566 [spare@fr gi ] I was thinking about switching one of my projects interfaces over to

Stopping ruby from escaping characters
368570 [shef.hauwang] I'm trying to open a file with variables encased inside the
368572 [josh.cheek@g] When you read it in, it is a String, not code being interpreted.

[ANN] Rainbows! 0.97.0 - a sleepy HTTP server
368571 [normalperson] Rainbows! is an HTTP server for sleepy Rack applications.  It is based on

Problems using gets() on a socket
368574 [geometric.pa] I have built a telnet "chat server" using TCPserver and a select
+ 368590 [shortcutter@] Well, that's perfectly OK since from the socket connection's point of
+ 368668 [rogerpack200] Posted via http://www.ruby-forum.com/.

[ANN] rcairo 1.8.5
368576 [kou@co mi ng] I released rcairo(*1) 1.8.5 that fixes build related

pcaprub on Windows
368577 [chris.rimond] I am trying to use Ruby on Windows to perform some low level packet
368605 [luislavena@g] I guess you can't use pcap from cygwin since is emulating posix while

delete char
368588 [myocean135@y] i want to make 'gkhj*&()' into 'gkhj',here is my code
368591 [ammarabuali@] puts item.gsub(/[^a-z]+/, '')
368597 [myocean135@y] it is ok,but i want to know  why my code can't run?
+ 368599 [myocean135@y] pt@pt-laptop:~$ irb
| + 368602 [list.push@gm] p 'gkhj*&()'[0] #Ruby 1.9
| + 368604 [fred@la av .] => "g"
+ 368601 [list.push@gm] I think you should take the advice of someone who shows you a Ruby way, but=

require from a method
368592 [ammarabuali@] Are there any gotchas in requiring files from within a method? It
+ 368593 [shortcutter@] Not technically.  It might even be more efficient if you require a
| 368594 [markus@fi ch] Sorry for hijacking, but I'm wondering how require exactly works in the
| + 368598 [shortcutter@] No.  It would be bad because then if the require statements would be
| + 368600 [Ruby@Go gl M] No. Required files always get evaluated in the global context. Which
|   368702 [shortcutter@] ng
+ 368603 [timrandg@gm ] for visualization) what files load when a given gem is loaded. When I

In Shoes, whye does ask_open_file run a shoes app?
368606 [ed.howland@g] If I have a bit of code inside Shoes.app block, like this
368609 [steve@st ve ] Hey Ed-

Playing raw PCM files in ruby
368607 [roger.braun@] I am trying to play the music from the old game "Ascendancy" using
+ 368608 [uzimonkey@gm] You might be better off converting these sounds to something that can be
| 368610 [roger.braun@] the
+ 368667 [rogerpack200] Linux or windows?
| 368679 [roger.braun@] Possibly both. But mainly Linux.
+ 368686 [rogerpack200] call out to VLC?
+ 368698 [yermej@gm il] On Aug 29, 1:45=A0pm, Roger Braun <roger.br...@student.uni-tuebingen.de>

Broken alias behavior in Ruby 1.9.2?
368611 [tron@so te .] The following code works in Ruby 1.8.7 but not in 1.9.2, instead, I get
368612 [transfire@gm] Your alias is only creating an instance method, yet you are using it
368614 [tron@so te .] Thank you for your reply. However, your suggestion resulted in
368615 [uzimonkey@gm] As far as I can tell, 1.9.2 ships with Base64.
368649 [tron@so te .] Thanks, Michael.

gsub  blank
368616 [myocean135@y] irb(main):011:0> "     gk".gsub("\s","h")
+ 368617 [myocean135@y] i get it
+ 368618 [hassan.schro] =3D> "hgk"
+ 368619 [josh.cheek@g] Your second example is almost there, except that it is a String, not a

Reading Peter Cooper's book; about regular expressions
368622 [sbstn26@ya o] x = <<MY_DELIMITER
368626 [bob@pr ul .c] The ^ anchors the regular expression to the beginning of the line.  In

368628 [rajajeyammca] confirm 20100830150641163941261635843 raja j=

case (variable) when type1  ... when type2 ... end
368629 [eugen@pr me ] how can I write case statement to check of specific type the variable has?
+ 368633 [jeanjulien.f] case var
| + 368634 [eugen@pr me ] oh, I was almost there :p
| + 368948 [tilde@au is ] "case" statment?
|   + 368949 [uzimonkey@gm] No, it's not a special behavior.  Explanation is here.
|   + 368951 [shortcutter@] "case" uses operator "=3D=3D=3D" to check conditions.  If you do "case x
|     368952 [tilde@au is ] Clear yet concise explaination, thank you!
|     368959 [tilde@au is ] Also (at least in 1.9.2) the alias is unnecessary, if a proc is provided
|     369006 [shortcutter@] Oh, that's great!  IIRC I suggested this a while ago.
+ 368638 [ralphs@do 32] ...

Speed issues iterating over chars
368631 [mail@ma sh .] This snip of code needs more speed. Ideas? What is the state of Ruby and
368635 [shortcutter@] cutoff
368641 [mail@ma sh .] This could be a good idea, but I am not entirely sure if it will work -
368643 [shortcutter@] Just try it out in IRB.  This creates a regexp with unicode names.
368645 [mail@ma sh .] regex = Regexp.union((-5 .. cutoff).collect { |n| (n + BASE_SOLEXA).chr
368646 [shortcutter@] It doesn't. Somehow I must have missed an important detail... :-)
368653 [mail@ma sh .] Yes, converting scores to arrays is bad since the scores are parsed from
368770 [shortcutter@] Here's what I'd probably do.
368790 [mail@ma sh .] Thanks Robert,
368812 [shortcutter@] Regexp is precompiled but I suspect that tr works at runtime only.

Unable to click using div(:text)
368639 [vibhavario@c] My application has a PowerGrid Control.

Pass an array to a new instance of a class.
368640 [jonathan.all] I am having trouble passing values to an array of a new instance of the
+ 368642 [wagner.andre] If I'm understanding right, the modifications I made to your code below
+ 368644 [shortcutter@] You could do
| 368654 [jonathan.all] Thanks Robert. I didn't think about pushing the items into the array
| 368705 [shortcutter@] Note though that the code above only appends a single Array to the Array
+ 368655 [jgabrielygal] Apart from all the other suggestions, you should change the container

Ruby v1.91 won't match literal plus sign
368648 [funn_bunch@y] text = "++"
+ 368662 [Rob@Ag le on] 1.9.1 and 1.9.2 both work fine.  Perhaps you have a particular bug in
+ 368676 [renard@nc rr] Works fine with ruby-1.9.1p378 on a Mac

Want to use Ruby/GTK2 + rcairo on Windows
368652 [satoshi@ri -] I'd like to use ruby-gtk2 package and rcairo on my Windows 7 laptop.
368666 [rogerpack200] from source, most likely.  Or if they have a binary distributable (for

[ANN] Rb++ / RbGCCXML 1.0
368657 [jameskilton@] What is rb++ / rbgccxml?

[ANN] Rice 1.4.0
368658 [jameskilton@] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

fork() function is unimplemented on this machine
368660 [ralphs@do 32] ...
+ 368665 [cremes.devli] As far as I know, Windows does not support fork.
+ 368671 [joelvanderwe] t = Thread.new do
| 368687 [ralphs@do 32] ...
| 368703 [shortcutter@] Another solution is to use cygwin which does support fork().
+ 368787 [Ruby@Go gl M] fork is a POSIX/Unix system call. It is therefore only available on
  368794 [shyouhei@ru ] All I can say is, if you want it being platform-independent, don't use fo=

Ruby 1.9.2 Constant Lookup with BasicObject
368661 [transfire@gm] ruby-1.9.2-p0 > module M
368722 [eugen@pr me ] module M is defined inside Object space.
368727 [transfire@gm] I filed a bug report on Ruby's issue tracker and matz brought up the
+ 368728 [matz@ru y- a] I understand your complain.  But the solution should be concrete, and
+ 368729 [fxn@ha hr f.] The rules of constant name resolution have changed with BasicObject.
  368740 [fxn@ha hr f.] After some trial and error it seems the algorithm is the same as in

Time#round in 1.9
368672 [transfire@gm] Anyone know about Time#round in 1.9. Apparently it exists but it seems
368674 [wyhaines@gm ] A voice was heard to utter: "Use the source, Luke! Errr, uh, Trans.
368677 [transfire@gm] The docs would be nice, but ri has been broken for months[1] and I

structural conceptual design of a slab as per EC2
368673 [datulravi@gm] I need a conceptual design plugin of Ruby for Sketchup for a concete

The nice new braintree_orange
368681 [phlip2005@gm] def test_successful_purchase

The nice new braintree_orange_test.rb is confused about what "purchases" are...
368682 [phlip2005@gm] def test_successful_purchase
368714 [b.candler@po] If this is a Rails-related tip, it would find the most appropriate
368737 [phlip2005@gm] Neither is the Rails mailing list correct for a plugin, duh.

Stuck on "No route matches" when porting to rails 3.0
368683 [d_rems@ya oo] I don't do anything special. This should work, but it doesn't.
368684 [d_rems@ya oo] Sorry guys this should go to Rails.

XSLT-like search in a Ruby Hash
368688 [rps@sa as co] I have a need for some relatively fancy searching in a hash, and I am
+ 368693 [joelvanderwe] ...
+ 368718 [shortcutter@] For the simple case one could do

Namespaces too looooooong
368690 [iainspeed@gm] What's the best trick for avoiding RSI with nested modules? For example,
+ 368691 [ryand-ruby@z] don't use them as much.
+ 368692 [joelvanderwe] Use local vars or (scoped) contants?
  368694 [iainspeed@gm] Excellent, thanks. I didn't realise they could just be stuck into vars.
  + 368696 [cmdicely@gm ] Is using deeply nested modules in such a way that a consumer of the
  | 368699 [iainspeed@gm] throwing out the good things learned over the
  | 368704 [shortcutter@] module A
  + 368712 [lists@ke pg ] Actually one of the few nice things about namespaces in PHP is the
  | 368713 [shortcutter@] ng out the good things learned over the years about things in computing see=
  | 368716 [lists@ke pg ] Sure.
  | 368717 [shortcutter@] wing out the good things learned over the years about things in computing s=
  | + 368726 [iainspeed@gm] I'd have to disagree. Like I said, when I was looking for best practice =
  | | 368730 [shortcutter@] Please note that my statement referred to bugs caused by not anchoring
  | + 368780 [lists@ke pg ] In my totally unscientific benchmarks I did not find any noticeable
  |   368781 [shortcutter@] hmark.
  |   368782 [lists@ke pg ] #!/usr/bin/env ruby
  |   368785 [shortcutter@] Or course you're right.  My bad.
  + 369033 [ryand-ruby@z] throwing out the good things learned over the years about things in =

how to get the table?
368697 [myocean135@y] please input in firefox,you can get the attachmeng
+ 368715 [myocean135@y] is there ruby edgar api to use?
+ 368720 [b.candler@po] Have a look at the 'mechanize' and 'nokogiri' gems, if you want to

[ANN] Money 3.1.0.pre3
368719 [shane.emmons] Money 3.1.0.pre3 released

Background colors? Re: the great ruby editor and ide roundup
368723 [markus@fi ch] I've added format rules to change background color based on content of
368762 [martindemell] Nice :) Didn't know google docs could do format rules.

Can't convert string to integer
368731 [dennismonsew] I am a newbie to Ruby so I apologize for my ignorance.
+ 368732 [peterhickman] So how about looking at what json['member_id'] contains?
+ 368733 [jgabrielygal] Can you show us what resp.body is?
+ 368734 [steve@st ve ] json = JSON.parse(resp.body)
  368735 [dennismonsew] I actually figured out my problem!
  368736 [dennismonsew] Thanks for all of the help guys!

Ok, so no $KCODE --a chance to learn a little about Encodings
368738 [transfire@gm] if $KCODE =~ /^U/i
368743 [transfire@gm] if str2.encoding !=3D str1.encoding

net ldap problem?
368739 [don.piotr@ya] I have server with Active Directory.
368741 [Joseph.Savar] Is u2 getting set?
368768 [don.piotr@ya] I didn't see that i can convert ut[:logonhours]

Ruby / Rails Training
368742 [ironmanusa@h] I am not sure if anything like this exists so thought I would ask
+ 368744 [joelvanderwe] Don't know much else about it than that, though.
+ 368746 [ryand-ruby@z] we were... it didn't stop in favor of objc, it stopped because we were =
+ 368747 [ben@bl yt in] It didn't stop in favor of anything. It's on a one-year hiatus for a
  368748 [ironmanusa@h] First off I haven't seen the syllabus but I am guessing you have
  368760 [ryand-ruby@z] you DO know that we meet every week at vivace on capitol hill... right?
  368761 [ironmanusa@h] I do but just not the sort of thing I am looking for at this point.

Mongoid dependency problems
368745 [jschuur@js h] I'm new to Ruby and struggling to understand some dependency problems

Ed Lambda: Functional programming meetup in Edinburgh
368750 [oliver.saund] I'm running a meetup for functional programming in Edinburgh. The

Local Area Play
368751 [andre_olsson] I'm working on a school project and creating a game. It will not be
368753 [brabuhr@gm i] Proof-of-concept on how to setup a shared screen client-server game with Go=
368756 [andre_olsson] Thanks alot, that really helped me.

Ruby DBI
368752 [djp1@ym il c] I've always been interested in Ruby and I'm finally starting to get my
+ 368755 [djp1@ym il c] I have installed the correct module now, and this is the error I am
+ 368767 [transfire@gm] ects/ruby-dbiand I ran the three commands to
  368773 [b.candler@po] 1. use the ruby mysql API directly, as described in those tutorials

Ruby constant lookup for classes in modules
368754 [jack@ja kc r] What's the difference between defining a class inside of a module and
368783 [peter.c.r.la] module Foo