105996-106666

105721-106925 subjects 106217-108647

Syntax question for gsub
105996 [dirk.einecke] I've a litte syntax question. I read a HTML file and change all between
+ 105998 [surrender_it] maybe like this?
| 106004 [dirk.einecke] That's it. Thank you very much.
+ 105999 [lopexx@au og] gsub!( /<(.+)>(.*?)<\/\1>/ ) { "<#{$1}>foo</#{$1}>" }
| 106001 [dirk.einecke] But this is only working for the tag "html". If I wont to use an other
| 106003 [lopexx@au og] It should work for any tag
| 106005 [dirk.einecke] gsub!( /<(.+)>(.*?)<\/\1>/ ) { "<#{$1}>foo</#{$1}>" }
| + 106006 [lopexx@au og] Sorry :D
| + 106009 [mrmargolis@w] having #{anyvariable} inside of a double quoted string will put the
| + 106043 [rubyguru@ho ] gsub!( /<(#{tagName})>(.*?)<\/\1>/ ) { "<#{$1}>foo</#{$1}>" }
+ 106020 [kristof@vl e] What about ( /<#{tagName}>(.*?)<\/#{tagName}/ )?
+ 106037 [jm@zz zz zz ] Example Regex Expressions (Markup Category)

[ANN] - win32-clipboard 0.2.0
106002 [djberg96@ho ] All,

[ANN] Net::SSH 0.0.3
106011 [jgb3@em il b] You asked for it, and you got it! Version 0.0.3 now supports port
+ 106017 [jm@zz zz zz ] Wow, that was fast!  We requested some of these features just days ago!
| 106019 [jgb3@em il b] I aim to please. :)
| + 106056 [jm@zz zz zz ] Beautiful!  This opens up a lot of possibilities.
| + 106075 [martindemell] Possibly stupid question - why's this not cancel_forward_local(12345)?
|   106076 [jgb3@em il b] An excellent point, Martin. It seems like there was a compelling reason
|   106105 [surrender_it] well, what if you have multiple local interfaces ?
|   106138 [jgb3@em il b] Hmmm. I'm pretty sure that wasn't the compelling reason I had thought
|   106179 [surrender_it] I think that multiple interface may be needed, but maybe not.
|   106183 [gsinclair@so] What does forwarding a local port to several remote ports even mean?
|   106208 [jgb3@em il b] I'm pretty certain it cannot be done with 'ssh'. I, too, can't quite
|   106246 [rcoder@gm il] Why not just have the IP address be an optional call to the
|   + 106247 [rcoder@gm il] Of course I mean the local IP address...not much use in trying to
|   + 106251 [jgb3@em il b] That's a good idea. However, it would mean the local port would be the
+ 106070 [cribbsj@oa w] I'm looking forward to this one, Jamis.
+ 106085 [jochen.i@gm ] I installed net-ssh right now and wanted to try the example you
  106087 [jgb3@em il b] require 'net/ssh/service/forward'
  106096 [jochen.i@gm ] Thank you for the quick reply. The additional require made it work for me.
  106137 [jgb3@em il b] Woops. My bad. Apparently you can't use public/private key
  106213 [jochen.i@gm ] Ok, I build myself a pair of rsa keys and now it works.

[HELP] : about class variables
106012 [kurk_lord@ya] in ruby class variables are private. Who know to do
+ 106014 [dblack@wo bl] class Toto
+ 106016 [surrender_it] => nil
+ 106029 [kurk_lord@ww] Thanks guys. It works so good.

REXML not quite doing what I need
106013 [keith_hodges] Can anyone tell me if REXML cn bepersuaded to generate using double
106108 [ser@ge ma e-] and I'll add it when I get a chance.  This week is pretty busy and I

Ruby 1.8.x in Mac OS X.4 (Tiger)?
106015 [jm@zz zz zz ] Anyone know if Ruby will be updated from 1.6 to 1.8 in the next major
+ 106018 [jaco@ne tt a] % fink list ruby
+ 106045 [eyez@il uz o] (Alexandria is the drive that holds my tiger install. Currently it

const_missing
106021 [elathan@ph s] I want to create class methods at run-time, so I use
+ 106023 [vjoel@PA H. ] Is this what you want?
| 106025 [dblack@wo bl] *Much* cooler than my answer! :-)
| 106067 [Richard_Dale] static VALUE
| 106429 [elathan@ph s] Right. This is exactly what I was looking for. Thanks a lot
+ 106024 [dblack@wo bl] Interesting question, but I suspect the answer is that you can't.

[ANN] SQLite-Ruby 1.3.0
106022 [jgb3@em il b] Looks like there were no problems found in the SQLite-Ruby release
106064 [Meino.Cramer] I tried to install with
106135 [jgb3@em il b] Interesting. Has anyone else had problems? Nothing changed in the setup
+ 106155 [ahoward@no a] jamis-
| 106159 [ahoward@no a] never mind me - i just read the source and see that you've set '@fields' and
| 106160 [jgb3@em il b] Glad you saw that. I need to take an hour or two and write up some
+ 106167 [Meino.Cramer] thank you for your reply ! :)
  106170 [Meino.Cramer] After activating gcc-3.4.1 be hand, sqlite-ruby 1.3.0 does compile
  + 106192 [ahoward@no a] very true - LD_RUN_PATH, for instance, doesn't do the 'right thing' when used
  | 106209 [jgb3@em il b] Hmm. Dang. Guess I'd better rethink my installation strategy then.
  + 106207 [jgb3@em il b] Not being a gcc expert by any stretch of the imagination, I have no idea

Re: Make A Fortune For Only $6 - MUST BE HONEST!!!
106026 [androflux@so] Get in this pyramid scheme and then *prevent* thievery? That's gonna be

How to install eRuby on Mac OS X 10.3
106027 [Mail@Jo as H] Welcome list, I am new to this and to ruby :-)
+ 106050 [nick@ac iv h] In general, look over http://www.rubygarden.org/ruby?RubyOnMacintosh for
| 106074 [Mail@Jo as H] Whuuu, there is modruby and eruby, what is the difference/their jobs?
| 106079 [farrel.lifso] eRuby is similair to PHP where the code is actually embedded in the
| 106093 [Mail@Jo as H] Thanks to your short and good help, I made it working! (Mac OS X 10.3
+ 106143 [roberto@RE O] It is probably easier to install and configure DarwinPorts
  106214 [Mail@Jo as H] system one is 1.6.8?

Ruby quickies and useful idioms
106028 [sstephenson@] There's a few trivial but useful "extensions" to Ruby's standard
+ 106030 [gsinclair@so] 'foldl' is, I believe, the same as Enumeration#inject.  Try checking
| 106035 [sstephenson@] Wow, I didn't know about Enumerable#inject. Semantically, it's not
| + 106046 [surrender_it] post an rcr about it or write your own module including Enumerable :)
| + 106054 [martindemell] My favourite 'practical' feature is that it tests for a seed value, and
| + 106062 [bob.news@gm ] "Sam Stephenson" <sstephenson@gmail.com> schrieb im Newsbeitrag
+ 106032 [phubuh@ph bu] These threads make the util.rb files from my long-abandoned projects
| + 106033 [phubuh@ph bu] I just took that verbatim from a utility file of mine, forgetting what
| + 106034 [surrender_it] the best shuffle I can think of is the Grossian shuffle (quoting
|   106036 [phubuh@ph bu] It's very nifty indeed.  I heard it was biased in some obscure way,
|   + 106038 [gsinclair@so] It is: biased in favour of suggestions I receive :)  The only major
|   | 106039 [phubuh@ph bu] Haha, I was referring to sort_by { rand }.
|   | 106041 [gsinclair@so] Oh!  Ahem ... (cough cough) ... so was I ... (mutter mutter blush) :)
|   + 106044 [flgr@cc n. e] It's actually "Florian Gro?", but I've seen the last character come out
|     106058 [surrender_it] well, I see it fine (well, I think that is the german letter similar
|     106059 [batsman.geo@] => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
+ 106057 [martindemell] I've found this useful on several occasions
| 106212 [gavin@re in ] It's too early in the morning for me to decode this. Is this the same
| 106237 [martindemell] Heh - so it is :) Mine was basically the translation from the list
+ 106060 [mneumann@nt ] values.all? {|v| v.is_a? Foo}
+ 106173 [ian@ca ib n.] I often find myself needing to instantiate a populated Hash, based on
| + 106174 [gsinclair@so] Just curious: what sort of scenario necessitates that use?
| + 106203 [pbrannan@at ] irb(main):001:0> a = [1, 2, 3]
|   106235 [martindemell] A flatten_once would really be a useful method to have around.
|   106238 [vjoel@PA H. ] Yes. Maybe even flatten(n).
|   106267 [dblack@wo bl] There's flattenx on RAA (http://raa.ruby-lang.org/project/flattenx).
+ 106279 [spam0504@bs ] A complement to Array each_with_index that I find myself using quite often
  106285 [dblack@wo bl] This is a perennial favorite :-)  I still pull in my home-made

Ruby Module Naming Convention vs Java Namespaces
106052 [jm@zz zz zz ] How do we manage namespaces in Ruby to avoid collisions with 3rd parties?
+ 106053 [eyez@il uz o] require "companyname/module"
+ 106055 [surrender_it] well, it is not really agreed I think, but I think the most common
| 106082 [jamesUNDERBA] Yes, but it's unlikely anyone else will release a library named REXML.
+ 106084 [dblack@wo bl] I would emulate the built-in/standard library style as much as
  106086 [bob.news@gm ] "David A. Black" <dblack@wobblini.net> schrieb im Newsbeitrag
  106088 [dblack@wo bl] Yes, but all for the common good.  I don't see the names of Matz's
  + 106098 [sean@ce so t] That's because Matz gets to choose the library names; who can "bump" his
  | 106132 [halostatue@g] Unsurprisingly, I disagree. Your "Interface" library could have been
  | 106142 [sean@ce so t] It's not simply an interface checking library, though; cs/Interface provides a
  + 106118 [gsinclair@so] The standard library should be considered a special case, IMO.  I'm
  | 106120 [rcoder@gm il] The standard library (and other modules that follow the
  | 106148 [jm@zz zz zz ] Good points.
  | 106161 [patrick@he a] There is a point to having name-space collisions.  Open source authors
  + 106184 [bob.news@gm ] "David A. Black" <dblack@wobblini.net> schrieb im Newsbeitrag

seg fault using optparse
106071 [robertm@sp l] Was running the optparse test program with 4 arguments (opttest.rb) under cygwin when it seg faulted. I have included the output of two different cygwin boxes (one at home, one work), both versions of Ruby are HEAD though a couple of days apart. Tried to get a strack trace, but when I recompiled ruby without the CFLAG O2, the problem disappeared.
106080 [nobu.nokada@] You'll need also -g3 -ggdb options.
106083 [robertm@sp l] Okay, will recompile and see what it yields
106091 [robertm@sp l] Hmm that didn't help, I assume that I am doing something wrong.

tk/autoload not found
106089 [wybo@se va y] After updating and recompiling and installing ruby, yesterday, my Tk
106100 [nagai@ai ky ] Do you have 'ext/tk/lib/tk/' subdirectory?
106110 [wybo@se va y] no, it's not there
+ 106116 [wybo@se va y] cvs -z4 -d :pserver:anonymous@cvs.ruby-lang.org:/src co ruby
+ 106149 [nagai@ai ky ] Not cvs option. Please use the update command option.

Gem & extconf.rb command line options
106090 [usenet@an re] i want to build a gem for an extension that needs to be configured with
106092 [rich@in oe h] gem install whatevergem -- --with-opt-dir=/sw
+ 106094 [lyle.johnson] I can't test it at the moment, either, but if memory serves doesn't he
+ 106097 [usenet@an re] Too many gem names (dbd-sqlite-0.1.0.gem, --with-opt-dir=/sw/);
  106101 [rich@in oe h] This must, unfortunately be broken in 0.7.0...i am sorry about that.

ruby-dev summary 23841-23877
106102 [ttate@tt ky ] I summarized interesting discussions which had been posted to ruby-dev
106106 [surrender_it] talking about cgi/session... is it impossible to think of providing

rb_define_alloc_func()
106111 [cmills@fr es] Any advice, documentation, or examples regarding this function?

Replying to Junk Mail Considered Harmful (Was: Re: Make A Fortune For Only $6 - MUST BE HONEST!!!)
106113 [ jupp@gm .d ] I don't think it is a very good idea to reply to junk mail. My index
+ 106122 [thomas_adam1] [..skip preaching..]
+ 106259 [androflux@so] *nods*
  106452 [ jupp@gm .d ] I think that 'to keep a person's nervous index finger from pulling

Fork style of little programs
106119 [markus.liebe] I would like to build some small ruby programs, that will work
+ 106123 [sean@ce so t] IO.popen("-") do | pipe |
| 106666 [markus.liebe] your input gave me a solution that might be used in the future.
+ 106124 [surrender_it] maybe you want IO.popen ?
+ 106185 [bob.news@gm ] "Markus Liebelt" <markus.liebelt@online.de> schrieb im Newsbeitrag

Newbie: Problem with irb
106125 [xdblade@zw r] I'm getting problem with irb, rdoc, and erb on Ruby 1.8.1 for windows
106129 [assaph@av ya] Check the header for C:\RUBY\BIN\IRB.BAT (or erb or rdoc .bat files).
106424 [xdblade@zw r] the actual top lines are
106475 [assaph@av ya] "%0" is the zero argument, always the name of the bat file.

problem with cerise & active_record & mysql on mac os x 10.3
106127 [k@v2 tu io c] Whenever I try to start the cerise server and one of the applcations
106188 [rasputnik@he] What have you got in that directory, is there anything that looks like
106190 [k@v2 tu io c] I don't have that directory because my mysql version is 4.0.20 (and even
106191 [rasputnik@he] ln -s /whereever/lib/mysql/libmysqlclient.whatever /usr/local/mysql-4.0.14/lib/mysql/libmysqlclient.12.dylib
106200 [k@v2 tu io c] I think I had tried that before and it didn't work, but since then, I've

OptionParser question
106130 [lists@lo ic ] ...
+ 106131 [gsinclair@so] OptionParser only concerns itself with -x and --xxx.  Anything else
+ 106141 [halostatue@g] As far as I know, you can't do this. For items that aren't preceded by
+ 106153 [ggarramuno@a] Download and install my port of Damian Conway's Getopt::Declare (at

can't override a cgi function, please help
106133 [cere@u. as i] This is soooo driving me crazy!
106134 [gsinclair@so] You're creating/overriding a *class* method of CGI, not an *instance*
106139 [cere@u. as i] That was actually the first thing I tried but I figured I would just
106140 [cere@u. as i] An undefined method error on checkbox.
106181 [surrender_it] I think oyu messed up something. Anyway you don't jave to use 'puts'

Problems creating a method to define a class with its method
106136 [linux@ma cr ] Dear list,
106145 [batsman.geo@] batsman@tux-chan:/tmp$ cat ghfdgh54yiyh.rb
106168 [linux@ma cr ] whow!! thank you. its seems to be a bit more complicated
106186 [batsman.geo@] Your code was

make install not working under msys/mingw32
106144 [vjoel@PA H. ] I'm upgrading my mingw32 ruby from 1.8.1 to the latest 1.9.0 snapshot.
106147 [vjoel@PA H. ] More information: it's not failing, exactly. It's installing to C:\. So
106154 [nobu.nokada@] Due to MSYS bash's weird behavior; it changes command lines
106165 [vjoel@PA H. ] Oh, ok. Good to know that before going too far.

Using Win32API to load an icon from .ico file
106146 [tom@al al .s] Has anyone successfully managed to do this?  I'm trying to write an
106166 [Mike@Ge ry c] LoadIcon is for loading icons from executable or resource files such as
106225 [tom@al al .s] ExtractIcon = Win32API.new("shell32","ExtractIcon",['I','P','I'],"I")

RubyGems 0.7.0 - still "Alpha" status?
106150 [jm@zz zz zz ] RubyGems looks very interesting...  Especially for those of us that miss

Re: RubyGems 0.7.0 - still 'Alpha' status?
106151 [gsinclair@so] Good question.  While RubyGems has come a long way, it's still on the
+ 106152 [chadfowler@g] Well said.  The "growth curve" is the primary thing keeping us from
| 106156 [jm@zz zz zz ] Sounds great!  Maybe it'll be like Firefox--gaining lots of users and
+ 106302 [jm@zz zz zz ] I just used RubyGems for the first time and love it!  It just doesn't

win32api: how to access NetFileEnum results?
106163 [jos@ca no k.] I'm trying to programmatically determine any network opened files on a Windows
+ 106180 [dooby@d1 .k ] I just learnt from this so I'll go for the longer answer that you can check.
| 106240 [jos@ca no k.] Thanks for the info. I did indeed overlook the `*' after the LPBYTE typename.
| 106266 [dooby@d1 .k ] Re-reading the API suggests a change of tack.
| 106300 [jos@ca no k.] This yields 10k worth of zeroes on my screen :) I think I understand what you
+ 106205 [shanko_date@] I cannot claim to have any insight into this API,

gets
106169 [ram_naga@ya ] I am new to Ruby Language. I just want to read a string using 'gets'
+ 106171 [hal9000@hy e] You shouldn't have any problem. You don't need a require or anything.
+ 106172 [demerzel@gm ] Welcome!
  + 106175 [ram_naga@ya ] Thanks a lot for the reply,
  | 106234 [sdate@ev re ] You can change the settings of SciTE so that this works like expected.
  + 106306 [nick@ac iv h] Sounds like Scite was the problem.  Just for reference, there are two

Failed tests with stable-snapshot & OS X
106189 [usenet@an re] Loaded suite .
106506 [nahi@ke na t] Thank you very much for the report.

Problem compiling ruby on AIX 5.2
106193 [sealclub@se ] I am trying to compile ruby for AIX 5.2 but I ran into some problems.
106197 [nobu.nokada@] I expect that stable snapshot works.

rbconfig bug? - was (Re: [ANN] SQLite-Ruby 1.3.0)
106194 [ahoward@no a] ~ > ruby -r rbconfig -r yaml -e 'y Config::CONFIG'
106196 [nobu.nokada@] $ ./configure CC=/full/path/to/gcc
106210 [ahoward@no a] good tip - thanks nobu.
106216 [nobu.nokada@] It's common for autoconf 2.5x.

problem with soap4r
106198 [erne@po er a] I'm trying to write a client that fetches a  weather forecast using soap4R.
106202 [srubin@fs sy] I started making a client for that service in Python.  The only tricky
106204 [erne@po er a] soap4R.
106362 [nahi@ke na t] Try wsdl2ruby.rb which is included in soap4r/1.5.2.
106442 [erne@po er a] Thanks, I'll give this a try.  I'm running Windows XP and ruby 1.81.   So

Arachno Ruby problem
106206 [keith_hodges] I was renaming a file in Archno Ruby IDE when it crashed and my file

[Pseudo-ANN] Sketchup 4.0 supports Ruby!
106211 [gavin@re in ] I don't work for @Last Software, the makers of Sketchup (a cool Mac/Win

Printing contents of a method
106215 [nsmith5@ni t] Does anyone know how to actually print (as a string) the contents of a
106221 [bob.news@gm ] "Nate Smith" <nsmith5@nist.gov> schrieb im Newsbeitrag
+ 106232 [nsmith5@ni t] Well basically I am writing a class editor like squeak or visual age for
+ 106244 [dave@pr gp o] Might SCRIPT_LINES help? (if the method is loaded into your program
  106253 [nsmith5@ni t] Forgive me if I sound stupid, but what is SCRIPT_LINES? I search google
  106255 [dave@pr gp o] SCRIPT_LINES__ (Hash)
  + 106264 [eh@ma .s ie ] Dave's example looks really cool, but my recent "Pragmatic" Windows
  | 106265 [jim@we ri hh] code/scriptlines.rb is the file Dave is using as an example.  You should
  + 106341 [bob.news@gm ] "Dave Thomas" <dave@pragprog.com> schrieb im Newsbeitrag
    106342 [decoux@mo lo] no, the node tree is a blackbox.
threads.html
top