104968-106709 subjects 105314-106468

define_method to add a Class method?
105121 [walter@mw ew] How do you use define_method (or an equivalent) to add a method to a
105123 [sean@ce so t] I'd stick with eval; it does the job.  Something like this should work just
+ 105124 [walter@mw ew] That was how original version worked, and I can seem to port
| 105125 [sean@ce so t] class MyClass
| 105129 [walter@mw ew] method
| 105131 [pit@ca it in] c = Class.new do
| 105154 [walter@mw ew] Excellent, That does work as expected.  I did try that previously,
| 105170 [nobu.nokada@] (class << self; self; end).class_eval do
| 105175 [walter@mw ew] Thanks Nobu,
+ 105130 [pbrannan@at ] Using eval doesn't allow the method to be executed in the context in

Simple mod_ruby counter using global variable
105126 [jm@zz zz zz ] I'm guessing this is because each Apache process has its own Ruby
+ 105132 [sean@ce so t] You could run your application as a stand-alone server and have your CGI call
| 105151 [rcoder@gm il] A file would work, but you'd have to be careful to lock it before each
+ 105247 [mortonda@dg ] I would use the Application or Session objects in the Ruby::ASP environment.

Ruby 1.8.2 to be released on July 7?
105127 [jm@zz zz zz ] Is Ruby 1.8.2 going to be released on July 7?  I heard a rumor that it
+ 105128 [mailinglists] This is the last email interaction between matz and Sean E. Russel on
| + 105381 [ser@ge ma e-] Read this conversanion carefully.  It does not mean that Ruby 1.8.2
| + 105712 [curt@hi bs c] Does anyone have any more info on this?
|   + 105713 [halostatue@g] I would personally wait; I know there are probably people waiting on
|   + 105727 [mailinglists] I have not seen any more comments about this on the Ruby Core Mailing
|     + 105780 [curt@hi bs c] producing
|     + 105784 [curt@hi bs c] This morning I decided to do just this, but I'm having trouble subscribing
|       105883 [botp@de mo t] keep on releasing rc-ies so that we can check the distro (not really the
+ 106305 [jm@zz zz zz ] The following was from matz today in comp.lang.ruby.core

105133 [Ara.T.Howard] is there a way dump executed commands to a file?
105139 [surrender_it] does this help?
+ 105141 [ahoward@no a] yes!  thanks!
+ 105229 [vjoel@PA H. ] def dump_history(file=nil)

slow method searching?
105134 [lists@za a. ] $ time ruby -e'a=(1..200000).to_a; a.classx'
+ 105135 [dave@pr gp o] Perhaps the time is being spent constructing the arrays?
| + 105137 [rcoder@gm il] Dave,
| + 105140 [lists@za a. ] $ time ruby -e'a=(1..200000).to_a; a.classx';        # slow
+ 105136 [sean@ce so t] You're timing how long it takes the OS to load the time program, the Ruby
| + 105138 [rcoder@gm il] Sean,
| + 105153 [drbrain@se m] The OS does not add 35 seconds of variance.
|   105155 [sean@ce so t] I think they've found the answer already, read back a few posts in the thread.
+ 105142 [g_ogata@op u] Ok, my turn to guess... :)
| 105168 [lists@za a. ] I guess you're right.
| 105169 [lists@za a. ] a) adding an optional argument to inspect, which is the maximum number
| + 105171 [dooby@d1 .k ] ## 2 * id
| + 105178 [pbrannan@at ] This will break classes that define their own inspect method.
+ 105144 [angus@qu va ] [David Garamond <lists@zara.6.isreserved.com>, 2004-07-02 23.56 CEST]
| 105147 [rcoder@gm il] eval.c from ruby-1.8.1, in 'method_missing', lines 4908-4910
+ 105145 [batsman.geo@] When the exception is printed, a string representation of the associated
  105150 [batsman.geo@] batsman@tux-chan:/tmp$ cat dfghdfg.rb

Windows installer
105149 [harryo@zi .c] I just noticed that, while there's an ri.bat in the ruby bin directory,
105172 [surrender_it] rj is not part of the core ruby distribution, why do you expect it to
105174 [harryo@zi .c] Ah.  It's just that I noticed an "rj" shell script in the directory
105196 [surrender_it] nevermind :)

rb_time_new() change in 1.8.2?
105162 [djberg96@ho ] Contrary to http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/2725,
+ 105163 [matz@ru y- a] ??
+ 105165 [dooby@d1 .k ] It isn't contrary.  In the same thread, Nobu explained why the

submitting bug reports
105166 [pbrannan@at ] What is the appropriate way to submit a bug report against the ruby
105167 [dooby@d1 .k ] As to ruby bug reports, I like seeing the English reports here

uncaught exceptions
105173 [csshsh@st uc] is there a way to catch uncaught exceptions globally for a
105177 [pbrannan@at ] The simplest way is to catch the exception at the topmost level of your

win32ole and uint64 handling
105180 [djberg96@ho ] Ruby 1.8.2 RC2
105273 [masaki.suket] Unfortunately, it is not easy to fix this problem.

A trivial irb question
105182 [mjkay@st nf ] Please excuse this infantile question.
105189 [dooby@d1 .k ] I think folks here will need to know the platform you're running on

Symbols & yaml (was Re: SOT (slightly offtopic): General OOP question)
105184 [dooby@d1 .k ] Sorry, I just noticed this and it almost spoilt
105185 [ahoward@no a] i had NOT noticed that.  thanks for the heads up!

SQLite/Ruby update pending
105186 [jgb3@em il b] I'm getting ready to release a "release-candidate" of SQLite/Ruby 1.3.0.
+ 105190 [ahoward@no a] sounds good.  hopefully you know that it goes without saying that you can take
| 105191 [jgb3@em il b] Thanks, Ara. I appreciate that. However, I always worry when doing that,
| 105198 [ahoward@no a] just keep up the good work!
+ 105206 [surrender_it] a quote() or escape() method built in would be useful imo
  105219 [jgb3@em il b] - Jamis
  105220 [gsinclair@so] Does that take care of NULs?
  105221 [jgb3@em il b] What do you mean? Can you give me an example?
  105222 [gsinclair@so] SQLite, I believe, chokes on strings that have NUL (0) characters in
  + 105226 [jgb3@em il b] I see what you mean. I've been using base64 to encode/decode as well.
  | 105241 [ahoward@no a] considering the nature of the binary data i am usually working with (satelite
  + 105228 [mailinglists] SQLite 3.0 has support for BLOB's.

[ANN] Alexandria 0.3.0
105187 [lrz@gn me or] Alexandria 0.3.0 has just been released!

Best way to determine if running on windows or unix-based system
105192 [carl.youngbl] I'm going to try using Ruby/DL to write a full-fledged ruby extension
+ 105193 [jgb3@em il b] ruby -e "p RUBY_PLATFORM"
+ 105195 [pan@er kv en] <code language="ruby">
+ 105197 [nobu.nokada@] It depends on what you want to know.  For instance,
| 105201 [carl.youngbl] Okay, forgive me for my ignorance but I thought a "ruby extension"
| 105202 [nobu.nokada@] Well, I guess it would be possible but wouldn't be called
+ 105200 [djberg96@ho ] if File::ALT_SEPARATOR

105194 [carl.youngbl] _why, I once again sojourned into the jabberwockian vastnesses of your
105214 [martindemell] +1

[ANN] SQLite/Ruby
105199 [jgb3@em il b] SQLite-Ruby is a module that allows Ruby programs to interface with

Problem with "eval"
105204 [dirk.einecke] I've a id and a value. Now I want a variable with id as name and the
+ 105210 [nkh@SP te e2] eval "#{id} = '#{value}'"
+ 105212 [eule@sp ce c] ~  eval %Q{ $#{id} = #{value.inspect} }
  105213 [dirk.einecke] Okay. It seems that a struct is a better way for me. I will try it on

Re: Problem with eval
105205 [dross@co e- ] sorry but your syntax is wrong. Also.. value is a string, so when you eval

Beginner question
105207 [mikael.x.lar] Fulton's" book "the Ruby way", but I haven'thad time to read it until now.
+ 105208 [hal9000@hy e] I think you're failing to understand that Ruby's classes are "open" --
+ 105209 [Mike@De et T] What you're seeing is the fact that you can reopen a class and add new

Regular expression question
105215 [ gm@na el gr] I have a question regarding regular expressions. Let me explain
+ 105216 [dblack@wo bl] Actually gsub *is* the /g equivalent :-) The problem is that you need
+ 105217 [msparshatt@y] try this
+ 105218 [demerzel@gm ] str.gsub!(/\{b\}(.*?)\{\/b\}/, '<b>\1</b>')
| 105264 [ gm@na el gr] Thank you all for the answer!
+ 105237 [johnatl@ma .] I realize you've gotten what is probably the most correct answer,
  105270 [chneukirchen] You would need .gsub! here, but str.tr('{}', '<>') is even better.

[ANN] Presentation proposals for RubyConf 2004 now being accepted
105223 [dblack@wo bl] We're pleased to announce that proposals for presentations at RubyConf

[ANN] Ruby-GetText-Package-0.6.0
105224 [mutoh@hi hw ] Ruby-GetText-Package-0.6.0 is now available.

http.post problems with base64 encoded data
105230 [jm@zz zz zz ] I can do http.post using simple variable values but I'm having some

http.post() problem only when using base64-encoded data
105231 [jm@zz zz zz ] I'm able to do a simple http.post() but when the data I'm posting is
+ 105232 [patrick@he a] What are you running on the server?  It looks to me like 'cgi' or
+ 105233 [jm@zz zz zz ] Problem solved.

Which version of Ruby is most widely used?
105234 [jm@zz zz zz ] What version of Ruby are most of us currenting using?
+ 105235 [mailinglists] This was for a bug in the Pragmatic Programmer Installer.
| + 105239 [jm@zz zz zz ] First, I don't think Ruby 1.8.1 for Windows sucks and I apologize if
| + 105266 [quixoticsyco] Just to clarify, this analogy does not quite match because there is a
|   105277 [dave@pr gp o] Just to be accurate here, although we kicked of this work, there's now
|   105282 [halostatue@g] Should it perhaps then be called something other than the "Pragmatic
|   + 105303 [curt@hi bs c] I've been calling it the "Ruby Installer for Windows", and informally
|   + 105318 [dave@pr gp o] Perhaps it should, should anyone feel strongly about this. The team
|     105341 [jbhurst@at g] open.  I typically install Perl & Ruby and other stuff from the CygWin
|     105366 [halostatue@g] I rarely drop into Cygwin to do anything useful. I never use the
+ 105236 [rich@li hi o] I use the latest stable release of the one-click installer - and I get
+ 105238 [surrender_it] latest snapshot on both windows and linux (actually latest one-clieck
+ 105242 [ahoward@no a] i have always just compiled the stable-snapshot and never had a problem and
+ 105305 [rcoder@gm il] Well, if you're asking about the most-used by developers actively

[ANN] aeditor 1.0 released
105240 [neoneye@ad l] dependency#2, fxruby
+ 105243 [sean@ce so t] Aeditor is a text editor with syntax highlighting?
| 105244 [neoneye@ad l] yes.. I forgot to mention that.. I am a little tired.
+ 105245 [nobu.nokada@] Just a question;  does this change tabstop size?  Can it change
| 105246 [neoneye@ad l] no.. sorry, not at the moment.
+ 105280 [eule@sp ce c] @font.create is not executed before onCanvasPrepare, and the font thusly
| + 105283 [surrender_it] well, it's strange anyway that on linux this does work :/
| | 105288 [jamesUNDERBA] Ah.  Opponent-based software.  Yes, I think I seen some of that lately.
| + 105291 [neoneye@ad l] Wonderful!
| | + 105296 [mailinglists] emacs has about 100.000 lines of C code to avoid the slowness of
| | | 105297 [neoneye@ad l] wew.. thats many lines, my project has ~3400 lines of source code
| | | 105309 [surrender_it] if we just had a ruby ->c++/ObjectiveC translator..
| | + 105302 [curt@hi bs c] It would, indeed, be interesting to see an aeditor freeride plugin. One of
| | | 105304 [neoneye@ad l] I need to enhance the editor sligthly more, before I give it a shot.
| | | 105313 [curt@hi bs c] Yes, FreeBASE is already a completely standalone system. Rich Kilmer (its
| | + 105306 [neoneye@ad l] I think I have added your suggested idea.. however I don't know if it changes
| + 105294 [lyle.johnson] I will not argue the merits of (potentially) reinventing the wheel
+ 105383 [neoneye@ad l] I hope I have fixed the font issues, so that it now works
  105434 [eule@sp ce c] ...
  105435 [neoneye@ad l] I had a chat session with Robert Klemme, who experienced almost the same,
  105462 [neoneye@ad l] Today Robert Klemme got it hunted down.. the recursion no longer happens.
  + 105476 [mailinglists] Maybe someone can help me too. Is there any unicode monospaced font on
  | 105554 [nhodgson@bi ] With Japanese, 'monospaced' tends to mean 'duospaced' instead with full
  + 105489 [eule@sp ce c] Your last fix got the editor working. [...]
    105542 [botp@de mo t] 1. I prefer courier new for default font (as attested by this email :-)
    105555 [neoneye@ad l] im on a non-windows box where there are no 'courier new' font,

[ANN] Diff::LCS 1.0
105249 [halostatue@g] I've been very busy lately on an ancillary project for Ruwiki because

Copland an IOC Containers in Real Use
105250 [carsten@ci c] every so often I go and read the wonderful stuff, that Jamis has put
105251 [jgb3@em il b] I'm so glad to hear that the documentation is readable. :)
105276 [michael.camp] I use a little IOC in java, and for me it was one of those

[ANN] Diff::LCS 1.0.1
105252 [halostatue@g] Gavin Sinclair pointed out a couple of problems. These have been

YAML questions/ideas
105253 [hal9000@hy e] I'm pausing from doing the hamster dance long enough to
+ 105257 [eban@os ri .] - !ruby/object:SomeClass { foo: 23, bar: 37, bam: 237 }
| 105268 [hal9000@hy e] Arigato!
+ 105590 [ruby-talk@wh] Yes.  Very soon.
  105593 [hal9000@hy e] Ahh, cool, cool. Thanks!

105254 [Meino.Cramer] In my program there is a hash of this form
+ 105255 [gsinclair@so] I presume you mean you just want an array of the *values* in the hash?
| 105256 [Meino.Cramer] whow! what a fast reply ! Thank you very much ! :)
| + 105258 [gsinclair@so] Sorry, Meino, I don't understand what you want.  You want to transform 'a'
| | 105265 [Meino.Cramer] ...oh,oh,oh...I think I have started a great Ruby-BigBang...
| + 105261 [harryo@qi so] How about ...
| + 105262 [bob.news@gm ] "Meino Christian Cramer" <Meino.Cramer@gmx.de> schrieb im Newsbeitrag
|   105263 [harryo@qi so] Yes, and if I'd read Gavin's whole message, I'd have realised I was just repeating what he said, too :-) ... except that I didn't realise there was a #values method!
+ 105272 [dmertz@fr e.] b = a.values
+ 105285 [vladare@ya o] b = a.values

Wiki spam
105269 [gsinclair@so] Folks,
+ 105271 [bob.news@gm ] "Gavin Sinclair" <gsinclair@soyabean.com.au> schrieb im Newsbeitrag
+ 105279 [surrender_it] add a uman detection system on the edit page. Mothing fancy, just
+ 105299 [patrick@he a] Do the spam attacks seem come from the same set of individuals, or are
| 105301 [jgb3@em il b] FWIW, I've got a CAPTCHA library on rubyforge that does just this. As
+ 105300 [aredridel@nb] Yes. Alter the engine so that external URLs go to a non-indexed-by-
  105316 [dga@lc .m t.] This removes the long term incentive, but the spammers can't
  105319 [aredridel@nb] I'm not sure. It seems to have effectively cut down on link-spam in a

Socket Status in ruby
105275 [acc@dd sc co] Does anyone know of a way to get the socket state/status (a la netstat -t's

[ANN] Samizdat 0.5.2, the Wiki release
105278 [d.borodaenko] Samizdat 0.5.2, the Wiki release

Seperate body content from HTML
105281 [mrmargolis@w] I am currently working on a script that will parse lyrics on online
+ 105284 [joaopedrosa@] Take a look at the HTMLTokenizer module at RAA.
| 105290 [mrmargolis@w] Excellent.  Thank you very much.
+ 105399 [kapheine@hy ] =20
  105436 [mrmargolis@w] Thank you Zachary.  I am checking out the API docs right now.

How do you like this?
105286 [NoOne@No he ] stmt = '{"a"=>%w(a1 a2 a3), "b"=>%w(b1 b2 b3)}'

multiple returns from a function (sorry, method!)
105287 [graham@ro kc] (line,format_line)=replace_tabs(line,fmt_line,@current_ruler)
+ 105289 [ruby-lists@l] line, format_line = replace_tabs(line, fmt_line, @current_ruler)
| 105295 [bob.news@gm ] "Alexander Kellett" <ruby-lists@lypanov.net> schrieb im Newsbeitrag
+ 105292 [graham@ro kc] Doh!, it works - I just put in some debugging, andthe caller is getting the

tracing variables
105293 [surrender_it] I wonder: is there a way in ruby to trace assignments to variables?
+ 105334 [pbrannan@at ] I don't know of any way, but I think it would be a nice feature to have.
+ 105336 [john.carter@] Umm, what exactly do you mean. $globals? Ruby magic variables like $:?
  105349 [surrender_it] paul, john, I'll try to answer both in one message.

[ANN] Net::SSH 0.0.2
105307 [jgb3@em il b] Version 0.0.2 brings the implementation to full compliance with the SSH2
+ 105308 [usenet1@no p] It would be nice if key authentication using Putty Agent (on Windows)
| 105310 [jgb3@em il b] Good point. However, I believe the putty utilities all know to look at
| 105312 [jgb3@em il b] K. I looked at it, and it's going to require a lot of work to support.
+ 105315 [jm@zz zz zz ] Thanks for working on this!!!
| 105323 [jgb3@em il b] Tunneling is not yet implemented, and I've been debating its usefulness
| 105324 [jm@zz zz zz ] 1.  accessing hosted mysql/postgresql server (ssl protocol feature not
| + 105325 [dross@co e- ] If you are referring to the X11 and port forwarding, I would use it. Could
| + 105326 [vjoel@PA H. ] I'd be interested in using this (for DRb) too.
|   105327 [jgb3@em il b] So, if I understand it correctly, what you (all) would expect to be able
|   105337 [patrick@he a] Why not just call the method #tunnel?
|   105372 [jgb3@em il b] Well, the term the SSH docs use is "port forwarding", so if you're
|   105438 [patrick@he a] Jamis,
+ 105328 [ksibilev@be ] Jemis,
  + 105329 [jgb3@em il b] Good question. I'm not familiar with the work being done on 1.9, so I
  | 105338 [ksibilev@be ] Your one-liner gives me the 'true' which makes me think that I have the
  | 105340 [gotoyuzo@no ] Sorry. I didn't apply the patch attached to [ruby-talk:103503].
  | 105371 [jgb3@em il b] Will do. Thanks for the clarification.
  | 105378 [gotoyuzo@no ] Yes. It was deleted on the day after ;-)
  + 105332 [nobu.nokada@] No.  It has already been merged to the HEAD at the same time as