300714-305330

300448-301020 subjects 300885-301420

Help with array
300714 [victor.reyes] ...
+ 300716 [AEtzold@gm .] Dear Victor,
| 300727 [victor.reyes] ...
+ 300745 [phrogz@ma .c] r,

Capistrano on CentOS won't go
300715 [xcampanoli@g] [bary@miller ~]$ cap -T
300719 [xcampanoli@g] so I installed net-scp and net-ssh-gateway, and it goes.  I thought gem

Get rid of "... XX levels..." in error backtrace
300718 [vshepelev@im] The question seems simple, but I can't neither found interpreter switch nor
300731 [justincollin] ...

This Week in Ruby (May 5, 2008)
300721 [acangiano@gm] Cheers,

ANN: DevFi podcast #1 - Buy/Build/Fork - with an interview of Dan  Berger, forker of Ruby
300723 [cmshea@gm il] Peter Jones and I have started a podcast on software development and
300739 [dan@da fi ni] ...

Escaped characters from the command-line
300726 [jrb562@dr xe] I've run into a bit of an issue that I hope you can help with.
300805 [albertschlef] It isn't a Ruby issue. It's a shell one. You need to find out how it's
300812 [jrb562@dr xe] Yes. Yes. But the idea is that it shouldnt matter.
+ 300826 [albertschlef] s.gsub!(/(\\[ntr])/) { eval %/"#$1"/ }
+ 300827 [cmdjackryan@] Have fun rewriting the *NIX shells, cmd.exe, and, possibly, PowerShell, too.

Extending Array and assigning to self
300728 [oliver.saund] I've got this class that is essentially an array with a few things
300732 [yermej@gm il] class Pages < Array
+ 300733 [oliver.saund] Fantastic yermej. I didn't know about that concat method.
+ 300737 [dblack@ru yp] file.read.split(page_delimiter)
  300740 [oliver.saund] Whoa! That answers the string question. Thanks :-)

[ANN] doodle 0.1.4 Released
300729 [sean.ohalpin] doodle version 0.1.4 has been released.

REXML thread-safe?
300730 [rforum@gm il] I am processing a lot of RSS using REXML and am hitting exceptions when
300820 [rforum@gm il] This was a bug with JRuby that is fixed in trunk.

Win32 Service Problem
300734 [damnbigman@g] ...
300735 [djberg96@gm ] There's no shell associated with a service, so doing backticks or
300787 [damnbigman@g] ...
300813 [damnbigman@g] ...
300815 [djberg96@gm ] You can fire up irb and check your version.
300817 [damnbigman@g] ...
300822 [damnbigman@g] ...
300825 [djberg96@gm ] Try Daemon.new.mainloop.
300828 [damnbigman@g] ...
300831 [djberg96@gm ] Add an explicit require 'win32/daemon' here and let me know if that
300833 [damnbigman@g] ...

Possible regular expression
300738 [james.sander] Ruby's regular expression engine appears to act incorrectly when given a
+ 300741 [phrogz@ma .c] s =3D "Age: 21"
+ 300742 [phrogz@ma .c] I forgot to note, in my previous reply, that my test results are
  300744 [cmshea@gm il] Rubinius and JRuby don't seem to suffer from it either.
  300750 [james.sander] Thank you Gavin and Chris for your verification. Gavin, you are right

writing pipe on Windows problem.
300743 [phasis@gm il] readPipe, writePipe = IO.pipe
301509 [phasis@gm il] It seems nobody cares about pipe blocking on windows.:(

Ruby 1.9, OS X 10.5.2 Test Fail! After Build
300747 [lmcdougall@c] I bet someone knows how to fix this one!
300762 [decoux@mo lo] Like said these are known bugs in the current implementation

[ANN] FastXml 0.1.91 - first real release
300749 [segfault@ha ] = FastXml, a simple fast xml library using libxml and libxslt

Ruby has to be interpreted line by line in runtime, does this affect  Ruby's execution efficiency badly?
300751 [hi.steven.tu] Why doesn't the inventor design a better approach to avoid this
+ 300753 [ara.t.howard] cat a.rb | ssh remote ruby
+ 300759 [shortcutter@] This is not true.
| 300760 [pstickne@gm ] Most advanced "scripted" languages (Ruby included) are parsed into
+ 301096 [fox@ns l. su] Interpreters have advantages and disadvantages.
  301106 [vidar.hoksta] Ruby _is_ particularly bad in this respect though. Unfortunately a lot
  301126 [robert.dober] I am not that sure about this, maybe we might call Ruby challenging
  301132 [cmdjackryan@] JRuby already beats MRI in a lot of cases, and it isn't even fully

In order to cross platform, Ruby is designed to be interpreted in  runtime, so Ruby code is exposed on the server. This brings a security danger  which is not acceptable.
300752 [hi.steven.tu] How about PHP? I think the same problem with PHP.
300755 [cmdjackryan@] 1) http://jerz.setonhill.edu/writing/e-text/e-mail.htm
300860 [no@sp m. le ] Not intending to feed the original troll, but your answer is only
300862 [cmdjackryan@] If I'm able to read source code in a, hopefully, protected directory,
+ 301063 [robert.dober] or a C compiler for that matter
+ 301065 [eeklund@gm i] I agree with reducing exposed attack surface.  I have a different way
+ 301090 [no@sp m. le ] A lot of stuff that completely failed to address my comment, which was
  + 301092 [no@sp m. le ] Sorry, I mis-read. I agree with this one. I thought you said you
  + 301111 [cmdjackryan@] Well, of course. But to exploit something, it has to be exposed first.

delegation question, where I want prototype style delegation
300756 [vieuxtech@gm] I want to make an object that behaves like another object would, if that
+ 300786 [james@gr yp ] What you really want in this case is normal inheritance, so the
| 300856 [vieuxtech@gm] Educational code, but doesn't quite do the trick, because the views
+ 300799 [ara.t.howard] class Base
  300857 [vieuxtech@gm] Ara, thanks for the suggestion. It suffers from the same

take text from file and add do it with Ruby..?
300764 [dark_sgtphoe] I have a text file that I want to add some content to, but I'm not sure
+ 300765 [sandro.pagan] ph_hashes = Hash.new("no phrase").merge({
+ 300766 [jazzezravi@g] Ruby program
  300772 [dark_sgtphoe] how can I save the output to a file?  I see where you're making it print
  300775 [jazzezravi@g] Try this one.....
  300780 [dark_sgtphoe] ahh, I see... thank you :)

Reading from file, create a class with variables
300767 [aardtwig@ms ] title     :Person
+ 300876 [kackihamas@h] Im also curious about how this could be solved...
| 300946 [dan@da fi ni] ...
| 301037 [sean.ohalpin] Indeed it is - see the code below. This requires the latest version
| 301039 [sean.ohalpin] It's not evident in the example I gave in my last post that Doodle
+ 300948 [jgabrielygal] This is my first try at solving this problem. It might not be very good,
+ 301044 [ara.t.howard] i'd do something like
  301385 [sean.ohalpin] Always a pleasure reading your code. One question: why are you
  301387 [ara.t.howard] class Specd
  301407 [sean.ohalpin] D'oh! Overlooked the obvious.
  301422 [ara.t.howard] heh

Unable to handle a browser window
300769 [pranjal.jain] In one web site  when i  am clicking on the page,  a new browser window

Hot to call to any parent class method?
300770 [ibc@al ax ne] method I need to call to iriginal "delete" method.
300779 [sandro.pagan] I've found this way...

I know this code is not very 'ruby'
300771 [ads@th bo he] there would be a much better way to code this function. In particular, I
+ 300773 [sandro.pagan] Compressed version :D
+ 300774 [eleanor@ga e] def discount(discount_category)
| 300802 [shortcutter@] I guess this should read
| + 300807 [cmdjackryan@] I don't like this.
| | 300810 [cmdjackryan@] Well, not even that bit of due diligence. *sighs*
| + 300809 [eleanor@ga e] That's what happens when I write code before my second cup of tea of
+ 300800 [caduceass@gm] You already have a hash structure...

Conversion mask in hex to bit mask
300776 [m.tyman@in e] I have 0xffff0000   ->  it can be represent by 255.255.0.0 or by string
+ 300803 [caduceass@gm] irb(main):001:0> 0xffff0000.to_s(2) =~ /0*$/
+ 300814 [shortcutter@] Not sure what exactly you mean by this.  Do you want to count 1's?
  300823 [caduceass@gm] I think Marcin wants to eventually convert/print out to shorthand the
  300829 [shortcutter@] Sounds reasonable.  Marcin?

installation update newbie question
300778 [ ma@rw i. om] I am installing a the win32-api gem and it gives an option of 4
300781 [jazzezravi@g] difference between ruby vs x86-mswin32-60

Rule engine creation????
300782 [varun.rajesh] I wanna make one dynamic rule engine for that suppose i create one
300783 [jeremymcanal] Check out a project named Ruleby.  It can help you with this.

Yet another question about extending ruby with C
300784 [btrichardson] I'm still working on figuring how how to extend ruby with C libraries.
300847 [albertschlef] "works perfectly"? I don't see how it can print "Bryan", for two
300849 [btricha@gm i] Thanks for responding. Sorry for not making things clear and easy to

Script not working
300785 [pranjal.jain] I am having a script which is not working when I am writing it inside a
300955 [u.alberton@g] When you define a method, it's not automatically executed by Ruby. So,

Ruby Hoedown 2008 - August 8-9, Huntsville, AL - Keynotes, Registration, and CFP OPEN!
300788 [jeremymcanal] The Ruby Hoedown, the southeastern regional Ruby conference, is
305330 [robertonrail] If anyone on the list is going to be attending the Hoedown let me know

trying to create an array with AA-ZZ for dutch postal codes
300790 [bookie988@gm] the array postcodes should be filled with strings starting looking
+ 300792 [list.push@gm] ("AA".."ZZ").each {|x| p x}
+ 300793 [farrel.lifso] postcodes = "AA".."ZZ".to_a
+ 300794 [peter@se an ] postcodes = Array.new
  300795 [bookie988@gm] thanx
  300796 [sandro.pagan] ((a = ('A'..'Z').to_a) * (b=a.length)).zip(a.collect{|e|

Re: trying to create an array with AA-ZZ for dutch postal co
300791 [jrb562@dr xe] ("AA".."ZZ").to_a

Performing a postback using Ruby
300797 [wjenkins@bc ] I am trying to automate a page that is written in .Net and uses
300798 [AEtzold@gm .] you can use AutoIt
300890 [wjenkins@bc ] I'd rather keep it all within Ruby if possible.  It's not the IE window

cgi.header redirect
300806 [fbogdanovic@] I tried to redirect a html page to itself to avoid browser's question about
+ 301396 [dev-null@pm ] The browser is doing the right thing.  It doesn't matter that the
| 301448 [hurikhan77@g] According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
+ 301450 [albertschlef] You need both a '302' line and a 'Location' header. (btw, according to

yaml load error (when using cgi)
300808 [unbewusst.se] i've a cgi wanted to make use of yaml and i get this error reported by
301397 [dev-null@pm ] Can you load the yaml file from outside your CGI script?  Are both the
301410 [unbewusst.se] Nope...
301413 [dev-null@pm ] I think the core issue is that your YAML file is malformed.  How did
301443 [unbewusst.se] File.open( history_file, "w" ) {|f| f.write( history.to_yaml ) }

Enter text into web save as box or authentication popup
300811 [nigel@up ic ] I have a web page that pops up a Authentication box and also a save as

Expect.pm like module in ruby
300816 [praveen@pe s] <http://search.cpan.org/%7Ergiersig/Expect-1.21/Expect.pod>
300819 [ryand-ruby@z] % ruby -ve 'p require("expect")'

display the cover page of a pdf document in jpg or png
300821 [yves_dufour@] I would like to display in my app the image of the cover page af an
300837 [TimHunter@nc] RMagick can convert a PDF to either PNG or JPG. If you just want the
300923 [yves_dufour@] Thanks a lot ! that's exactly what I want to do...

ANN: Mack 0.5.0 Released
300832 [markykang-ru] Mack 0.5.0 has been released today with the much debated ORM support

Where to put code for extending a class?
300834 [manuel.meure] I want to extend the String class with a capitalize_each_word method
300839 [robert.dober] I would clearly monkeypatch String itself.
300859 [manuel.meure] Robert, could you explain a bit more what you mean?
300864 [cmdjackryan@] !: Why is top posting bad?
+ 300868 [manuel.meure] Hehe, this took me a second to understand, but I got your clue.
| 300871 [d_rems@ya oo] Anywhere in your program flow.
| 300889 [s.korteling@] Well, anywhere before you actually use the new method.
+ 300893 [dblack@ru yp] Not by everyone :-) I know I'm in the minority, but I'll put in a word
  + 300928 [cmdjackryan@] Ruby and monkepatching produces results on Google. :P
  + 300970 [james.britt@] I'm with David.
    301025 [robert.dober] I understand David's POV as well as Philip's, I would have said MP as

get method in Array subclass: where's it defined?
300835 [RichardDummy] Daniel Finnie in another tread help me define a Matrix of essentially
300836 [TimHunter@nc] There is no get method in Array. The get method comes from your original
300851 [RichardDummy] Thank you very much for your response.
+ 300852 [phrogz@ma .c] On May 6, 8:51=A0pm, RichardOnRails
| 300932 [RichardDummy] Thank you for responding.
+ 300872 [albertschlef] Your code "works with no definition of get anywhere" because it doesn't
  300957 [RichardDummy] As you obviously recognized that I was totally out at sea on this
  + 300979 [dan@da fi ni] ...
  + 300983 [albertschlef] Daniel Finnie was faster than me ;-) but I'll my answer nevertheless; it
  + 301109 [RichardDummy] On May 7, 12:41 pm, RichardOnRails

SocketError: getaddrinfo: nodename nor servname provided, or
300838 [baq@ni g. om] I'm on Mac OS X, Leopard, check out my ruby version/gem env below.

Re: SocketError: getaddrinfo: nodename nor servname provided
300843 [me@mi ha lb ] Can we pleas see the code that is causing this error?
300844 [baq@ni g. om] require 'net/http'
300845 [me@mi ha lb ] require 'net/http'
300846 [baq@ni g. om] Great, that did it!

[ANN] quartermaster 1.0.0 Released
300848 [dave.myron@c] A collection of shortcuts and helpers for leveraging a request's env

Ruby in HTML
300850 [loadeddesign] I've been googling this, but with no concrete answers... Ruby 186-26 is
+ 300853 [tim.pease@gm] Might you be looking for something like Webby?
+ 300863 [cmdjackryan@] Rails and Merb are probably the easiest way to get started.
+ 301042 [jeremy@hi eg] Do you mean use ruby to serve the local html files to your browser?  This can be

Date Parsing
300854 [clement.ow@a] I have a script which I need to create a new Time or Date object to
300861 [bbxx789_05ss] strptime() is essentially undocumented, so I can't help you there.  But
300865 [clement.ow@a] However, I have 2 formats, one yyyymmdd and the other just ddmmyyyy(w/o
300867 [clement.ow@a] or is there any way that we can convert something like ddmmyyyy to
+ 300874 [phasis@gm il] [sidns@ns ~]$ irb
| 300877 [bbxx789_05ss] $ irb
| + 300883 [phasis@gm il] Ruby 1.8.4 fails but Ruby 1.8.6 works.
| + 300884 [clement.ow@a] Date.strptime('20081020',"%Y%m%d")
|   300888 [clement.ow@a] and im running ruby 1.8.5.. could it be why this has a prob? Like a bug
|   + 300894 [phasis@gm il] I guess you missed
|   + 300992 [bbxx789_05ss] It appears that Date.parse() and Date.strptime() are/were broken, and
|     302651 [khaines@en g] require 'date'
+ 300875 [bbxx789_05ss] Any string can be parsed using one of the examples I posted.

Plain english to condition??
300855 [varun.rajesh] 1. Use will type plain English in text box like designation equals PM or
300943 [dan@da fi ni] ...

flexmock not working in cygwin
300858 [pood.forums@] require 'flexmock/test_unit'
301010 [gthiesfeld@g] Did you
301011 [pood.forums@] lol, totally forgot! thanks!

Create a new file name by appending timestamp to original
300869 [sunny_bogawa] i want a new file name from existing file name but with attaching time
300878 [shortcutter@] If you do not tell us what you did and what error you saw we cannot

Where to start if I want to print to
300870 [d_rems@ya oo] 1. Linux (CUPS) printers
+ 300873 [cmdjackryan@] 1.) The CUPS API documentation
| 300887 [d_rems@ya oo] Seriously. I thought this would be simplier.
| 300895 [cmdjackryan@] Beats me. My mind-reading powers are in the shop for maintenance at the
| 300897 [d_rems@ya oo] So why do you answer if you are on maintenence.
+ 300901 [aff28@de et ] You could look into the cross-platform GUI toolkits, for example wxRuby,

How to use to_yaml_style?
300879 [sgwong513@ho] def a.to_yaml_style

Cisco Wants You Back!
300880 [kill-test@ho] As a networking professional whose certification has lapsed, you are

Re: Create a new file name by appending timestamp to origina
300881 [sunny_bogawa] i want  attaches a timestamps to file for this i doing Time.now_filename
+ 300886 [botp@de mo t] # i want  attaches a timestamps to file for this i doing
+ 301159 [shortcutter@] Not sure what you are really doing, I get

timestamp
300882 [sunny_bogawa] i want  attaches a timestamps to file for this i doing Time.now_filename
300892 [AEtzold@gm .] Dear Sunny,
threads.html
top