228464-229568

228223-245933 subjects 228684-243681

^ Get Number of regex matches
228464 [ingoweiss gm] how can I get the NUMBER of matches for a regular expression in a given
+ 228472 [ruby muerman] "Banana".scan(/a/).size
| 228483 [martindemell] This one skips the intermediate array construction in return for some
| 228567 [shortcutter ] => true
| + 228601 [ingoweiss gm] Thank you very much for all your great suggestions!
| + 228643 [jameshcunnin] banana.split('').reject { |i| i if i != 'a' }.length
+ 228473 [wilsonb gmai] 'Banana'.scan(/a/).size

^ How to shoot yourself in the foot in Ruby
228468 [efine145-nos] Thanks for responding - this time there's a bit of noise at least!
+ 228470 [martindemell] self.shoot(foot) and yield
+ 228478 [john.carter ] #!/bin/ruby -w
  228525 [hhausman gma] Thats cute.
  228526 [drbrain segm] eval? please!
  + 228529 [hhausman gma] ahhhh, now that's the Ruby Way.
  + 228562 [nospam nosit] / ...
  | 228709 [nospam nosit] Depends on whether the target directory exists. :)
  + 228657 [ruby muerman] That's missing your foot altogether and shooting yourself in the head instead...
    228773 [david vallne] Muah.
    228817 [caldridge gm] ;-)

^ general question about ri and specific question about LookupAccountName
228471 [slamboy gmai] While looking through ri File, I found Windows::Security, and in there is a
228489 [drbrain segm] Do you have two copies of the gem installed?  ri doesn't handle that
228536 [shiwei.zhang] Eric,

^ [ruby-talk] Ruby based SMTP server?
228475 [goodjobfastc] People,
228491 [nospam nosit] Perhaps it would help if you were to tell us what you are trying to

^ Re: Installing shared object library into non-standard directoryi
228485 [ara.t.howard] permissions?

^ YAML problem with cyclic data structures
228486 [umptious gma] I'm having a problem with YAML in the first slightly-more-than-toy
228642 [umptious gma] Ok...

^ Why is this regex invalid?
228490 [danfinnie op] irb(main):002:0> regex = /([0-9]*)([^\+- ]+)(.*)/
+ 228492 [mental rydia] When an unescaped - appears in any position but the first or final one inside brackets, it is interpreted as a range separator rather than a literal '-'.  Apparently '\+- ' isn't a valid range.
+ 228493 [aledonne.lis] It's the placement of the - that makes a difference. In a character
+ 228494 [cschneid col] I'm pretty sure the dash needs to be escaped in regular expressions.
| 228514 [ dak gnu.org] Rubbish.  In character ranges, \ is not special.
| + 228517 [daniels pron] A rubbish upon your rubbish. \ are special pretty much anywhere.
| + 228540 [kbloom gmail] irb(main):014:0> /[a\+\- ]/=~".\\"
+ 228495 [wilsonb gmai] The hyphen in the middle expression is ambiguous, because it could
+ 228496 [junnichi gma] '-' shuld be escaped like this.

^ Re: Ruby based SMTP server?
228498 [dan.bikle gm] Paul,
+ 228502 [flori nixe.p] sendmail is a SMTP server. You (or someone who knows how to do it) might
+ 228503 [garbagecat10] Take a look at EventMachine. If this looks like it will work for you,

^ [Solution] [Quiz] Turtle Graphics (#104)
228506 [email55555 g] Here is my quick solution.

^ Ruby On Rails Opportunity - SYDNEY
228507 [westonkieran] I am currently looking for a permanent Applications Developer to be

^ Problem with Marshaling WeakRefs?
228508 [umptious gma] I'm experimenting with Marshal, but I'm having problems making it work
+ 228513 [logancapaldo] WeakRefs should be junk when you load, if they're allowed to be
| 228518 [umptious gma] If this is correct, it's still a bug until it is VERY clearly
+ 228515 [matz ruby-la] No, it's a bug.  Thank you for finding it.  Note that restored weakref
  228520 [umptious gma] By "will" do you mean "should"? Because it looks to me at the moment as

^ Using Ruby Web Service from a C# .NET Client
228509 [parappayo gm] I'm trying to set up a sample project of a Ruby web service consumed by
228524 [cohen.jeff g] I've always had mixed luck trying to do soap between Ruby and .NET.
228554 [snacktime gm] He should really be using rails and actionwebservice, it makes this
228560 [parappayo gm] True enough!

^ [ANN] memcache-client 1.2.1 Released
228516 [drbrain segm] memcache-client version 1.2.1 has been released!

^ Re: Manipulating large audio files.
228519 [ramon.tayag ] I checked out gridflow but it seems to be used only for video or

^ Ruby SOAP client questions
228531 [tom.samploni] I'm trying to write a Ruby SOAP client to talk to, what appears to be

^ [GOLF]: partitioning an array
228533 [ruby muerman] Take an array of objects and partition it into subarrays, based on
+ 228538 [ara.t.howard] module Enumerable
+ 228539 [has.sox gmai] def group a
| 228547 [daniels pron] It's actually cleaner and shorter without that inject.
+ 228563 [rosco roscop] a = ['a','bc','def','g','hi','jkl','m']
  228566 [shortcutter ] The last line is definitively superfluous in the light of Hash#values.
  228568 [martindemell] This is common enough that it deserves to be its own constructor, imo
  + 228597 [dave burt.id] Would you want one of these, too?
  + 228602 [ara.t.howard] my own lib has
    228659 [transfire gm] def Hash.new_by(o='[]')

^ how to make webfetcher download images
228541 [seannakasone] The following script uses WebFetcher to recursively download html
228552 [seannakasone] never mind, i figured it out.

^ #help in reading from csv file
228546 [tanushree.bh] Here I am trying to read from a cvs file
+ 228578 [learn woa.hu] Here how you can access correctly a csv file. This works and is more in
+ 228599 [james graypr] create_product(row) unless row.empty?

^ bug in SGML parser
228549 [cesium62 yah] The sgml parser

^ puts overwrite line
228555 [nappin713 ya] I have a script where I want to print the same line over and over
+ 228557 [hhausman gma] hth,
| 228559 [nappin713 ya] Works Perfect! Thanks!
+ 228558 [farrel.lifso] You're probably goint to need console UI lib like Highline

^ [Puzzle] How to do parameter variation?
228556 [dr garyboone] Suppose you want to do several runs of a program or function, varying
+ 228595 [ruby anthrop] }
+ 228598 [james graypr] #!/usr/bin/env ruby -w
+ 228686 [dr garyboone] Cool. While I study the others, here's my solution. Looks like it's

^ [rake] "--directory" patch
228561 [andrea.fazzi] I prepared a patch for lib/rake.rb in order to include a new option in

^ Ruby 3D Math libraries?
228569 [bart.braem g] Does anyone know good Ruby 3D Math libraries? I found Math3D
+ 228570 [nospam nosit] For some reason, you have a very limited math library on your system.
| + 228576 [bart.braem g] Strange, but I noticed my libm.a is not in my path. I'll fix that first...
| | 228579 [nospam nosit] That should change things, but if this problem persists, write a simple,
| + 228582 [bart.braem g] I removed the check for the function and now the Makefile is perfectly
|   228644 [nospam nosit] This is not a very good idea. The resulting library may appear to be intact,
|   228718 [bart.braem g] I understand your arguments but I'm looking at this from different
+ 228577 [bart.braem g] I'm working on linux, but thanks for the information!

^ How to unpack unusual binary structure?
228571 [leopardus.vu] (I suspect this comes from .h file)
228572 [farrel.lifso] Have you looked at String#unpack ?
228589 [leopardus.vu] Yes, but I do not know how to apply it in the case of packed data
228590 [farrel.lifso] This is just a guess and I'm not sure what time_t is but if we assuume

^ NoMethodError in protocol.rb
228574 [alex blackke] Does this look familiar to anyone?
+ 228575 [nospam nosit] You aren't showing us the block to which this yield refers. Does that block
| 228661 [drbrain segm] Irrelevant.  #write0 is the code you are looking for.
+ 228653 [drbrain segm] Yes, this is going to be a problem in a multithreaded environment.
  228706 [alex blackke] I've found a workaround for our code, anyway.  I'm not quite sure why I

^ REXML/RSS parse error
228580 [patrick erdb] I have a problem while parsing an RSS file. I try to open a URL via
228593 [kou cozmixng] In <4577F0FB.8020300@erdbeere.net>
228604 [patrick erdb] Thank you, I hadn't seen it. I've written an e-mail to them, but the
228606 [kou cozmixng] In <45782BC1.1040307@erdbeere.net>
228611 [patrick erdb] Yes, that works very well :-). I'm very happy now *g*. Thank you very much,

^ insert into erb binding
228583 [jwells serva] I have a class that takes a template, parses it through ERB, then takes
228587 [jan.svitok g] def evaluate_locals(local_assigns = {})
228721 [jwells serva] surely this won't work as the binding in my case is coming from an
228737 [jan.svitok g] So once more: The trick is to use eval with binding as an additional argument.
228755 [jwells serva] Ah ok, I get it but here is the problem, which I didn't specify...

^ rescue and continue on next statement ?
228586 [user domain.] begin/end block which raised the exception...
228662 [drbrain segm] File.delete "#{@fichier_destination_sql}.gz" rescue nil
228700 [efine145-nos] Hmmm... is it just because this is an example that the code is repeated?
228701 [efine145-nos] %W[#{@fichier_destination_sql}.gz

^ IEEE-488 (GP-IB) Interface Lib for Ruby
228596 [John.Joyce d] Greetings,
+ 228667 [david vallne] Get the COM ones, and try WIN32OLE? Probably a fairly nice and
| 228680 [tim.pease gm] There is some sample code here ...
| 228754 [John.Joyce d] Thank you all very much for the leads.  I'll check them out and see what I
+ 228679 [tim.pease gm] Have not tried these personally. We use the NI Ethernet / GPIB

^ Odd result when attempting to use Mechanize in parallel with Threads
228603 [richard.conr] running on specific ports. We have a lot of devices & software with a
+ 228608 [ara.t.howard] require 'mechanize'
| 228612 [richard.conr] <homer>*d'Oh</homer>
+ 229264 [shiwei.zhang] Actually in Ruby, only by the method ".new" we can make threads
  229325 [richard.conr] This is what I noticed. I join up 5 threads at a time, the output jumps

^ Show your support for Rubinius!
228605 [ssmoot gmail] (I hope you don't mind a bit of cross-posting, but seeing as how the
228613 [tim.pease gm] I've been wanting to ask this question for a while now, so here goes.
228618 [binary42 gma] This brings up a really good point. Maybe this is when we should start
228620 [wilsonb gmai] Rubinius currently makes some use of RubyInline, but that's likely to
228622 [benjohn fysh] I'd like to know more about Rubinius, but all the info I've got on it
+ 228624 [jameskilton ] I haven't found anything, and there's very little documentation in the
+ 228625 [wilsonb gmai] #rubinius on irc.freenode.net is a good resource.
  + 228699 [efine145-nos] AFAIK, Ruby does not have a formal language specification. The language
  | 228978 [jeremymcanal] They are working on an official Ruby spec and testing suite.
  | 228980 [dblack wobbl] Official, or formal?  (I've been in favor of both for a long time --
  | 228988 [james graypr] Well it was discussed at the Ruby Implementors Summit where Matz was
  | + 228994 [dblack wobbl] Cool.  I know that in the past Matz has indicated that he'd be willing
  | + 229005 [wilsonb gmai] Is there a mailing list / webpage for the spec project? I want to get involved.
  |   229008 [efine145-nos] I'd be interested in learning more about the spec project and possibly
  |   229009 [james graypr] James Edward Gray II
  + 228973 [benjohn fysh] 1) Compiles Ruby directly to assembly language, and
    228990 [wilsonb gmai] It compiles to assembly language, but it is assembly language for the

^ [Solution] [Quiz] Turtle Graphics (#104)
228607 [email55555 g] My second solution.
228640 [nospam nosit] degrees %= 360
228645 [email55555 g] Got it. Thanks. ( the result of a % b will be >= 0 if b > 0 ... )
228648 [nospam nosit] The result will also be >= 0 if a < 0. I am adding this clarification for

^ Parsing information from a forwarded e-mail
228609 [ozeid target] Is there an easy way to parse out the information in a forwarded e-mail
228639 [nospam nosit] Not everyone uses Outlook, and there typically are differences between
228748 [ozeid target] I'm kind of new to programming in general, so you may have to dumb down

^ [SUMMARY] Turtle Graphics (#104)
228610 [james graypr] I'm going to move my standard thank you note right to the beginning of this
228626 [email55555 g] Well, using this way, it may create "invalid" segment.
228656 [james graypr] Well a track with just one segment is legal so I assume a segment

^ rb_iterate
228614 [tim.pease gm] If anyone out there has used the "rb_iterate" function in a Ruby C
+ 228623 [ara.t.howard] see ext/dbm/dbm.c
+ 228858 [george.ogata] ** Control Structure

^ Math3D problems
228615 [bart.braem g] After my previous batch of test failures I am now up to this point: tests
228617 [bart.braem g] Right, this failure was a matter of not running the default Math3d::TestCase
228663 [drbrain segm] If this is an abstract test case then undef_method :default_test.
228712 [bart.braem g] That is a much nicer solution, thanks for the advice!

^ Catching X raise events with FXRuby
228619 [guslist free] My application is using gnuplot as a sub-process. I would like the

^ Array changing after concat function
228628 [wai-kee.chun] Can someone shed some light on this problem. In the example, I am
228630 [matt tidbits] Array.new(array) copies the *array* but it does not copy its *elements*.
228631 [wai-kee.chun] If they are referring to the same object, why is it when
+ 228632 [wai-kee.chun] copy = one.map { |el| el.clone }
| + 228636 [nospam nosit] But the "clone" method is included in the API documentation, it is a
| | 228638 [dblack wobbl] You don't need to do the join("\n") -- puts will puts each item in
| | 228649 [nospam nosit] Thanks! I was in irb when I applied this non-"fix".
| + 228655 [olsonas gmai] It seems much simpler to just clone the array rather than each element
|   + 228658 [stefano.croc] Your code doesn't solve the problem. If a contains mutable objects, such as
|   + 228664 [dblack wobbl] But that won't do a deep cloning, which is what it sounds like WKC
|     228720 [wai-kee.chun] Thanks, this has helped.
+ 228633 [stefano.croc] tempArray and one are two different objects (as you can see using object_id),
+ 228654 [matt tidbits] Reread what I said. I didn't say that tempArr and one refer to the same
  228839 [logancapaldo] That is the most disturbed, and yet apt analogy ever. Mind if I quote you?
  228840 [matt tidbits] Clearly you've never read any of my books.
  228849 [efine145-nos] (Off-topic to Matt)
  228881 [matt tidbits] Close enough. :)  m.

^ Re: Turtle Graphics (#104)
228629 [efine145-nos] I think that you should mention a subtlety here. The calculation of a
228652 [james graypr] Both terrific points.  Thanks for bringing them up!

^ openstruct oddity
228651 [andreas_s ho] <html><div style='background-color:'><DIV class=RTE>In reference to thread <A onclick=hilight(117889) href="http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/117889">117889</A>&nbsp;Wed, 27 Oct 2004,</DIV>
228660 [andreas_s ho] Pardon my ignorance. I wasn't aware that the mixin module at top level
228855 [george.ogata] At the top level, the "current object", self, is a particular instance
+ 228856 [george.ogata] .gsub(/class/, 'module')  # :p
+ 228870 [vidar.hoksta] The current class (or module - I saw your correction) is in "self" when
  229568 [george.ogata] You're correct (well, almost), but that's two expressions... ;-).  And

^ Colored error messages
228665 [djhackebeil ] Does anyone know whether it is possible to write code which shows me
+ 228666 [drbrain segm] I'm pretty sure you have the wrong mailing list, but I have no idea
| 228677 [ snk gna.org] OP probably wanted the Ruby on Rails list.
| 228678 [wilsonb gmai] In Rubinius, backtraces are instances of the Backtrace class, and they
| 228685 [djhackebeil ] Have I understand you correct that colored error message r not possible
| 228687 [danfinnie op] No, they are possible.  According to the other posters, you can just
| 229050 [djhackebeil ] Where can I find the Exception/Backtrace class?
+ 228693 [KDr2 163.com] the script "script/server" of rails framework can do this,just read it.

^ Ruby enums in C
228668 [joevandyk gm] Each instance of Joe has a MOOD which can be HAPPY, SAD, or NEUTRAL.
+ 228670 [drbrain segm] rb_iv_set(joe, "@mood", rb_intern("sad"));
+ 228671 [its_conebred] Posted via http://www.ruby-forum.com/.
  228676 [joevandyk gm] Is there much difference between using a C constant for that, and
  228681 [drbrain segm] A C constant takes more work to expose to Ruby.  You have to map that

^ Help with rake
228669 [its_conebred] Can anyone tell me exactly how rake works? How does it know what to do?
+ 228672 [drbrain segm] Jim Weirich's site onestepback.org has several articles on how rake
| 228674 [its_conebred] Thanks for the help.
+ 228675 [tim.j.stewar] ...

^ [ANN] Ruby-VPI 12.0.0
228673 [ snk gna.org] Ruby-VPI is a Ruby interface to Verilog VPI. It lets you create

^ exit
228682 [aotianlong g] how can i exit
228683 [danfinnie op] exit!() to immediately abort
228854 [aotianlong g] yes ,more mails come to my email ,i just want to change a email to receive
228857 [jan.svitok g] send an email with a subject of 'unsubscribe' to ruby-talk-ctl@ruby-lang.org
228859 [aotianlong g] ok , thankyou!
threads.html
top