381782-383133 subjects 382246-383404

^ Parsing text
382038 [cyril_jose y] Hey all,
+ 382039 [wishdev gmai] Good Afternoon,
+ 382041 [bbxx789_05ss] A pipe is one of the special regex characters--it does not stand for a
+ 382042 [cyril_jose y] Thanks John and 7stud - I have a better understanding now.

^ [ANN] Inochi 6.0.0
382040 [sunaku gmail] Inochi

^ Reversing a string without using array, classes and reverse function
382043 [passionate_p] mystring = gets
+ 382044 [spiralofhope] Here's something I stumbled through which seems to work.
| 382047 [passionate_p] I attempted below given code, but it is neither displaying result nor
| 382053 [josecalderon] #!/usr/bin/env ruby
| + 382057 [stu rubyprog] very nice I like the use of your math. By multiplying the array index
| | 382058 [stu rubyprog] One more with ruby blocks (This would be the ruby way =3D) )
| | 382060 [larrylv1990 ] #!/usr/bin/env ruby
| + 382067 [passionate_p] Thanks all for brilliant examples.
+ 382056 [stu rubyprog] Simple =)
+ 382061 [robert.dober] What about
| 382070 [josecalderon] @Robert: Thanks, Cheers
| 382082 [b.candler po] I'm surprised nobody has yet shown using 'inject', as for once it makes
| 382087 [robert.dober] that was mean ;)
+ 382063 [hanmac gmx.d] why without reverse functions?
+ 382066 [list.push gm] s = "I am a string."
| + 382068 [spiralofhope] Oh, of course!  This makes a lot of sense to me..
| + 382069 [passionate_p] @Harry,
+ 382100 [josh.cheek g] Thought I'd join the fun :)
  + 382101 [dukeofperl m] [snip the good stuff]
  + 382103 [adam apresco] I feel a benchmark coming, of all the suggestions so far. :)

^ [ANN] Rumai 4.1.2
382045 [sunaku gmail] Rumai

^ [ANN] Inochi 6.0.1
382046 [sunaku gmail] Inochi

^ dump in yaml & unexpected result
382048 [ploy.sukacha] I have a Hash which value is Array of Hashes. And I expected to generate
382071 [aaron tender] Can you provide the code you're using to produce this YAML?

^ Can I append hash to hashes?
382049 [ploy.sukacha] Member => {email => Email, name => Name, lastname => Lastname}
+ 382051 [cidza tin.it] maybe I cannot understand your problem (?)
+ 382054 [sutniuq gmx.] Have a look at the Hash#merge and Hash#merge! methods.
| 382055 [ploy.sukacha] Actually, I need to do like in array which I can use << to assign more
| 382059 [robert.dober] Sure there are two ways, the destructive one, in which the receiver is
+ 382064 [ploy.sukacha] thanks Robert, it works.

^ [ANN] Detest 3.1.3
382050 [sunaku gmail] Detest

^ [ANN] Ember 0.3.1
382052 [sunaku gmail] Ember

^ Split dot and equa sign by recursive
382065 [ploy.sukacha] I need to do a function which can split dot and equa by recursive.
+ 382084 [list.push gm] Do I understand this correctly?
| 382095 [ploy.sukacha] Yes, that's what I want.
| 382105 [list.push gm] What have you tried so far?
+ 382085 [b.candler po] Is this a homework question? Otherwise, why do you say you want to use a
| 382088 [ryand-ruby z] Almost guaranteed. Google the email address.
+ 382106 [ploy.sukacha] I already found the solution.

^ Is it usual/valid to extend custom classes under Errno module?
382073 [ibc aliax.ne] doesn't raise an exception (as it's expensive) but instead returns a
382488 [cmdicely gma] This usually is a bad idea since performance on errors isn't really
382494 [ibc aliax.ne] expensive (or more) than returning a value. Also take into account
382517 [cmdicely gma] That's not surprising. Still, unless its really not an exceptional
382518 [ibc aliax.ne] Yes, non-blocking paradigm breaks all the rules (joking) :)

^ Can I check the a hash contain another hash in deep check?
382076 [ploy.sukacha] h = {'Member'=>{'number'=>{'name'=>'Name'}}}
382078 [bbxx789_05ss] h = {'Member'=>{'number'=>{'name'=>'Name'}}}

^ Recursive to check same key in has
382083 [ploy.sukacha] h1 = {project=>{opp=>{Index=>{title=>Opportunities}}}}
382086 [b.candler po] This is a case where recursion may be helpful.

^ Jruby Error in tomcat
382089 [prachitripat] I was running a load test on a jruby on rails application. I got the
382234 [headius head] I think I've seen this before, but you probably want to post to the

^ Array indexing
382090 [dukeofperl m] hey ...
+ 382091 [bbxx789_05ss] If someone had a gun to your head and told you that you had 30 seconds
+ 382096 [josh.cheek g] numbers = *0...10 # => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
  382098 [dukeofperl m] [snip the good stuff]

^ How to split dot . only before equal =
382092 [ploy.sukacha] I need to split dot only before equal to assign to hash
+ 382093 [bbxx789_05ss] str = "Project.risksPotentialAfterSum=Pot. aft."
+ 382094 [ploy.sukacha] 7stud,
| + 382097 [roylzuo gmai] You need regex lookahead syntax
| + 382104 [bbxx789_05ss] str = 'projects.risks.Index.flash_downloading=Downloading.test'
| + 382166 [bbxx789_05ss] str = 'projects.risks.Index.flash_downloading=Downloading.test'
|   382173 [bbxx789_05ss] ...and you can even get rid of that ugly if check every time through the
+ 382110 [ploy.sukacha] I already got the solution. thx all

^ [ANN] Redhead 0.0.1 -- String header metadata
382102 [adam apresco] Redhead 0.0.1 is the first release of a library to work with

^ who can eplain deeply the ruby's methods?
382107 [mafei.198 gm] I wants to know the ruby's methods' describe,the relationship between
+ 382113 [stu rubyprog] It's an object oriented inheritance hierarchy of abstract data types.
| + 382114 [stu rubyprog] To see what methods are associated with what class which is not
| + 382118 [mafei.198 gm] thank you very much.
|   382133 [stu rubyprog] I could edit the post (which I can't) I'd remove my lazy run on
|   382136 [mafei.198 gm] I have just read your questions at this place, i think you are a deep
+ 382172 [bbxx789_05ss] That isn't a necessary relationship--it just happens to be true in that
+ 382174 [bbxx789_05ss] a) Singleton methods are inserted into an anonymous class immediately
  382194 [mafei.198 gm] Thank you 7stud~

^ Are there other Ruby folks using "distributable dynamic agents" for project work?
382108 [gmkoller gma] Good Day,
382132 [ryand-ruby z] so far searches have not found anything.
+ 382141 [gmkoller gma] One part of the concept as I am working with it is to have the "Class
| 382143 [gmkoller gma] I think just now a "example vocabulary" -  that is built automatically
+ 382151 [josh.cheek g] FYI, SwarmShepherd is thunk, about whom you have previously said
  382160 [ryand-ruby z] so
  382170 [gmkoller gma] When I visited here the first time I was very excited to have the

^ =?windows-1252?Q?Re=3A_How_to_split_dot_=93=2E=94_only_before_equal_=93=3D?= =?windows-1252?Q?=94?=
382109 [robert.dober] actually the lookahead can be a little simpler here, (?=.*=) does the
382112 [robert.dober] =?windows-1252?Q?Re=3A_How_to_split_dot_=93=2E=94_only_before_equal_=93=3D?= =?windows-1252?Q?=94?=

^ Can I split the array from text?
382111 [ploy.sukacha] If I have an array like this
+ 382119 [yimutang gma] Maybe you can refer to Enumerable#slice_before
+ 382121 [yimutang gma] Here's a tricky one:)
| 382122 [roger rogerb] How about this?
+ 382126 [b.candler po] a = ["Member", "Friends", "Hello", "Components", "Family", "Lastname"]

^ Does String#encode in Ruby 1.9.2 have option :fallback?
382115 [yimutang gma] My Ruby version is: ruby 1.9.2p180 (2011-02-18) [i386-mingw32]
382116 [nobuoka r-de] You can use :fallback option on ruby 1.9.2.
382117 [yimutang gma] Thank you! It works.
382120 [nobuoka r-de] No, it can't on ruby 1.9.2p180...
382124 [yimutang gma] Quite a good feature!

^ Set attribute of superclass dinamically
382123 [jeroeningen ] I have the following code
382128 [josh.cheek g] What was the error it gave you? From here, I have a hard time believing you

^ Re: Set attribute of superclass dynamically
382125 [b.candler po] That's wrong - class names must start with a capital letter
382127 [jeroeningen ] In the meantime, I also found another solution that is good for me
382131 [b.candler po] That *calls* the setter method, but only if it already exists. If it

^ Encoding issue under Windows
382129 [lolmaus gmai] Windows console works with the CP866 encoding.
382168 [rogerpack200] I'd ping core on this one.

^ Re: Windows CMD and international chars ()
382130 [lolmaus gmai] ``````

^ Ruby on cPanel
382135 [hybmg57 hotm] I want to use Ruby's FTP in cPanel but I'm a total beginner and have no

^ Re: A good portable text editor/IDE for Ruby?
382137 [zhaocheng df] Hey, iknow someone discuss this problem in
+ 382144 [robert.dober] Now that it seems to work nicely on Linux too, I'd give redcar a try
+ 382150 [spiralofhope] ...
  382190 [f.linard fdt] +1 for Geany on Windows... (didn't try the protable edition, but should
  382207 [sunaku gmail] For similar functionality in Vim, check out the Screen[1] plugin

^ Need to build smtp server in Ruby?
382138 [martin angle] Dear Friends,
382154 [b.candler po] 1. Create a subclass of GServer
382162 [code apotheo] Well . . . the querent *did* only ask for suggestions on "how to

^ How to run ./script/generate rx_config ?
382139 [ploy.sukacha] I'm a newbie and i'm working follow this link
382169 [bbxx789_05ss] demo/
382188 [ploy.sukacha] I open the command line by right click on project and select command
382211 [bbxx789_05ss] How about trying to open a command line(window?) manually?

^ problem with ruby19's Hash behavior
382140 [aaron2ti gma] see the following codes pls, I wonder if this's a intent or a bug. For me the first line sounds better having same result with the later line
382142 [roger rogerb] the first line sounds better having same result with the later line
+ 382145 [roylzuo gmai] I still cannot understand.
| 382147 [aaron2ti gma] @Roy
+ 382146 [aaron2ti gma] Thanks a lot ;)
  382155 [Rob AgileCon] [1].inject(
  382191 [aaron2ti gma] @Rob thanks
  382201 [Rob AgileCon] The block form is executed when the requested key does not exist. It

^ Earn Easy PPC Form Filling Jobs
382148 [sriram.sarav] ...

382149 [devivithyama] ...

^ Need a gem that can interface with QC API
382152 [payalpatel11] I wanted to integrate my ruby code with Quality Center API. I wondering

^ [ANN] whistlepig: real-time search for ruby
382153 [wmorgan-ruby] I've released Whistlepig 0.5.

^ Replace any multiple whitespaces with single white space
382156 [michelle mic] That is, only single white spaces are permitted.
+ 382157 [joelvanderwe] sub! only affects the *first* match. You can substitute globally with
| + 382159 [josh.cheek g] I think the original regex is better, because leads to more consistent
| | 382161 [joelvanderwe] Good point, but it depends on what you're trying to be consistent with.
| | 382164 [g.diemant gm] There is also the build-in method squeeze!, which does exacly this
| + 382200 [b.candler po] Those are not equivalent, because \s matches more than just ASCII 0x20.
|   + 382206 [joelvanderwe] ...
|   + 382208 [joelvanderwe] You're right. What I said in another post about preserving tabs isn't
+ 382158 [wishdev gmai] Good Morning Michelle,
+ 382196 [alexandermcm] Try gsub for multiple characters - Try code below:=20

^ Using TK with Mac Snow Leopard and Ruby 1.87
382163 [kmandpjlynch] I'm going thru the book 'Learning Ruby' and am trying to use TK...
+ 382165 [ryand-ruby z] updating
+ 382171 [kmandpjlynch] gem which tk gives the following error: ERROR:  Can't find ruby library

^ [ANN] ruby-prof 0.10.5
382167 [rogerpack200] Pleased to announce ruby-prof gem's 0.10.5
382175 [sunaku gmail] Would it be possible for users that do not have or cannot use
382209 [rogerpack200] Oops those were copied from an OS X box.
382210 [sunaku gmail] Posted via http://www.ruby-forum.com/.
382389 [rogerpack200] Ok, done and released for 0.10.6

^ Can I Add quotes to values in a array? or include quotes..
382176 [skolopen yah] Please advise on my situation.
+ 382182 [n.baksalyar ] require "yaml"
+ 382212 [bbxx789_05ss] In Ruby, two of the String constructors are ' ' and " ".  So if you
| 382214 [alexandermcm] =20
| 382222 [bbxx789_05ss] Don't ever do that!  Horrible.
+ 382213 [bbxx789_05ss] Note that you can use any delimiter with %q and %Q: {}, [], !!, so you

^ Re: Shoes 3 released
382177 [dske02 126.c] <strong><a

^ no such file to load -- sqlite3 (LoadError)
382178 [jimsyyap gma] I am learning how to use ruby from the book, 'beginning ruby, novice to
+ 382179 [joelvanderwe] You need libsqlite3-dev, which will provide sqlite3.h.
+ 382180 [jimsyyap gma] Thanks for that quick reply.
| 382181 [joelvanderwe] Unfortunately, you'll have to build the gem again, since gem and apt are
+ 382183 [jimsyyap gma] running--
| 382185 [joelvanderwe] Yeah, that's what I meant :)
+ 382184 [jimsyyap gma] found this on google-- http://goo.gl/2zcza gave it a try and got these--
+ 382186 [jimsyyap gma] irb--

^ [ANN] test-loop 12.0.3
382187 [sunaku gmail] test-loop - Continuous testing for Ruby with fork/eval

^ Allocate two objects simultaneously in multi-threading
382189 [dot.cyclone ] I'm studying Ruby 1.9.2 source code. Some issues about simultaneity.
382366 [huard.elise ] good point, but at the moment this is not an issue, thanks to the

^ what is keyboard equivalent?
382193 [jimsyyap gma] In the attached image file (http://goo.gl/brVSa), the symbol in the red
+ 382197 [g.diemant gm] Don't type it in. This symbol represents a linebreak and isn't really part
+ 382198 [spiralofhope] Sometimes when a person wants to show their code to someone else, their
  382223 [stu rubyprog] This is for presentation purposes. If you need to deal with a

^ auto completion in Eclipse for Watir library
382199 [tcblues gmai] I'm trying to add auto completion in Eclipse when writing watir code.

^ Setting a 'reference' inside the method body
382202 [peter.szinek] Hey guys,
382203 [fxn hashref.] You cannot change the reference stored in the caller's baz, because
382204 [b.candler po] (bar.clear that is). Using bar.replace({}) is another option. Both of
382235 [headius head] FWIW, I always discourage people from using blocks as bindings,
382237 [robert.dober] =A0eval( "defined?(password) ?

^ Set BINARY attribute for a datamapper query?
382205 [rfsllc gmail] Does anyone know how to add the attribute BINARY to a datamapper query?

^ "cheat" gem
382215 [dukeofperl m] dnormandin@select-man:~$
+ 382216 [echristopher] Is your gem bin directory in your $PATH?
| 382219 [dukeofperl m] This message is in MIME format.  The first part should be readable text,
+ 382217 [b.candler po] You didn't specify your platform. If it's Ubuntu or Debian, then you
  382220 [dukeofperl m] Yep! I'm on Xubuntu and your above hint did the trick! Thanks!

^ [ANN] rake-compiler 0.7.8 Released
382218 [luislavena g] rake-compiler version 0.7.8 has been released!

^ [ANN] ambit-0.9.1 released
382221 [jwise draga.] =3D ambit

^ [ANN] unicorn 3.6.1 - HTTP server for fast clients and Unix
382224 [normalperson] Unicorn is an HTTP server for Rack applications designed to only serve

^ including Enumerable in PStore
382226 [redge.tan gm] add "map" functionality to it. For a regular hash, you can do the
382230 [cmdicely gma] It looks like, during a transaction, the content of a PStore is
382238 [redge.tan gm] Thanks. I didnt realized before that opening up a class would give you
+ 382245 [shortcutter ] Regarding your original code
+ 382285 [cmdicely gma] Well, I have to second what Robert Klemme said and suggest that if you

^ [ANN] tilt 1.3
382227 [rtomayko gma] Tilt is a generic interface to a bunch of different Ruby template

^ pattern matching and array methods
382228 [emphxl yahoo] 1:1 abcdefg
+ 382229 [josh.cheek g] I suppose you could use a flip flop... or awk :P
| 382257 [josh.cheek g] Actually, you need a regex here, because start_with?("1:2") will match "1:23
+ 382231 [cmdicely gma] If you just want to print the selected lines, the array methods
+ 382239 [dhruva.sagar] line.each {|l| puts l if l =~ /^(1:2)|(1:3)|(1:4)/}
| 382243 [b.candler po] That's a poor answer, because your regexp isn't anchored properly. It
| 382244 [jgabrielygal] lower_major, lower_minor =3D "3:9".split(":").map {|x| x.to_i}
| 382255 [code apotheo] r)
+ 382258 [bbxx789_05ss] If do some work to save the lines in an easily accessible structure, you

^ File.open of HTML file removes code
382236 [elwood32 liv] Hey there,
+ 382241 [n.baksalyar ] type index.erb
+ 382242 [b.candler po] File.open("...") just opens the file and returns an open File object,
+ 382260 [elwood32 liv] Thanks to both of you!
| 382282 [bbxx789_05ss] You need to post that .erb file.  Or, even better, create the most
+ 382287 [elwood32 liv] Thanks again for the comment, it led me to test some stuff out and found