256023-258901 subjects 256428-257157

^ (none)
256251 [prateek.daya] unsubscribe

^ Moving photos from a media card
256253 [rubyforum we] Trying to move and rename photos from a media card using OS X.
256264 [AEtzold gmx.] If you still can't copy files, you may not have sufficient
256288 [rubyforum we] Axel

^ How can i get data from .txt file and .xml file?
256257 [coolwong85 y] I have .txt file that is .xml format. i using require "rexml/document"
256258 [alexg kuicr.] Alex Gutteridge
256273 [doodpants ma] I am not the OP, nor do I have an answer for him, but I would like to
256277 [james graypr] That page links to a REXML tutorial, though the link doesn't seem to

^ trying to use regex
256259 [merrittr gma] rob@rob-laptop:~/ruby$ ./html2.rb
+ 256261 [alexg kuicr.] You need to escape the '/' in your regexp, and unless your html file
| 256281 [Rob AgileCon] text = @response.scan(%r{<body\b.*?>(.*?)</body>}mi)[0]
+ 256282 [olsonas gmai] HTML parsing can get quite complicated, why not use a library? I've

^ Net::Telnet
256263 [m.tyman inte] <code>
256265 [alex blackke] It sounds to me like either c or the regexp are modified by a different
256266 [m.tyman inte] It's impossible that it is due to modification of c variable in other

^ [RE-ANN/ADV] Rails Routing 'short cut' (Addison-Wesley)
256267 [dblack wobbl] The link I gave in my announcement of my Rails Routing 'short cut'

^ [ADV] Ruby Hoedown (the southeastern regional Ruby conference) updates!
256275 [jeremymcanal] Since registration opened, we've been hard at work to get the details

^ [Fwd: Re: How can i get data from .txt file and .xml file?]
256280 [Reid.Thompso] Reply-To: Reid.Thompson@ateb.com

^ Re: Getting a files mime-type
256283 [thomas nexus] I was looking for the same thing, found

^ unsubscribe
256287 [email2nilez ] unsubscribe

^ GetoptLong, but not on ARGV
256290 [transfire gm] Is there a way to utilize Getoptlong on an arbitrary command var, ie.
256303 [robert.dober] Basically did
256308 [transfire gm] Ah, so we need a patch. Okay well I guess I'll post that up on the
256352 [robert.dober] Yes definitely ARGV is hardcoded, I was however fooling around, trying
+ 256368 [nobu ruby-la] You forget about #terminate.
| 256371 [robert.dober] Thanks nobu, does this fix it?
| 256471 [nobu ruby-la] Almost, but #terminate can be called outside #get.  I think
| 256495 [robert.dober] I did not want to lecture ;)
| 256722 [robert.dober] Here goes the patch implementing Tom's idea. I also removed the clumsy
+ 256402 [transfire gm] def argslist
  256416 [robert.dober] Hmm more in the spirit of the original class probably.

^ Default text entered in a puts dialog
256291 [rubyforum we] I want to put a default answer in the text entry box that appears when
256292 [jan.svitok g] This is the best I can imagine: you cannot fill the input buffer
256294 [rubyforum we] TextMate errors on strip. I change to chomp and TextMate errors on empty
256315 [m_goldberg a] I ran the above code in TextMate with Run (cmd-R) and it worked fine.
256336 [rubyforum we] An update fixed the problem.

^ ncurses menu wrapper
256293 [eclubb valco] I noted in the readme for ncurses-ruby that there is no wrapper for the

^ if == any item in an array
256296 [rubyforum we] I'd like to write something like
+ 256297 [hhausman gma] I think you're looking for Array#include?
+ 256298 [rick.denatal] case
+ 256300 [rrafje gmail] PhotoEndings = /JPG|MRW|JPE/i
+ 256301 [ezmobius gma] PhotoEndings = %w[JPG,MRW,JPE]
+ 256302 [tim.pease gm] PhotoEndings = %w(JPG MRW JPE)
  + 256306 [jeremy hineg] Or take a completely different approach to the issue, use the mime/types
  + 256333 [rubyforum we] Thank you and all the others that answered. The array.include was what I
    + 256353 [sepp2k googl] It has nothing to do with wildcards. The * takes an array and turns it into
    + 256363 [skoot ideico] =20
      256496 [shortcutter ] If there are *many* choices you would probably choose another solution -

^ Behaviour of Enumerables reject vs. select mixed into Hash
256299 [aljoscha wei] irb(main):001:0> a = {'foo' => 'bar', 'baz' => 'qux'}
256311 [transfire gm] I have to concur. I've never liked that. You'd think there'd be some
+ 256354 [robert.dober] So do I, Do you happen to  have some remedies for this in Facets?
+ 256357 [aljoscha wei] Absolutely.
  256361 [shortcutter ] The #select in Enumerable can only return a "general" type - in this
  + 256362 [aljoscha wei] ...
  + 256364 [aljoscha wei] Sorry for the empty post, to much clicking without thinking.
    256365 [dblack wobbl] I think Robert's point is that nothing other than a general type makes
    + 256367 [robert.dober] That is ok, but we are complaining about
    | 256370 [dblack wobbl] Yes, but making a special case of Hash, as opposed to other
    | + 256372 [m.fellinger ] So what, making #reject return an Array as well?
    | | 256375 [dblack wobbl] Yes -- see about 18 lines up :-)
    | + 256376 [robert.dober] Sure there is, I do not want to convert Arrays back to Hashes all the
    | + 256384 [ymendel pobo] The inconsistency of return values between Hash#reject vs. Hash#select
    | | 256410 [dblack wobbl] Didn't you like my evasive use of "&select_block"? :-)
    | + 256498 [rick.denatal] It probably won't surprise you but I see it differently.  I'd actually
    |   256500 [dblack wobbl] Maybe, but I'll admit that at this stage in this thread, I'm more into
    |   + 256502 [transfire gm] Nice.
    |   | 256580 [rick.denatal] I just added
    |   + 256506 [caduceass gm] I'm not really sure if I'm off-base here, but the first thing you
    |     256543 [robert.dober] No need to create a new collection as an array, no harm to create a
    |     + 256545 [aljoscha wei] As I see it, there should _be_ no Hash#reject (nor Array#reject).
    |     | 256547 [robert.dober] Alexander thank you so much :)
    |     + 256581 [caduceass gm] My hash isn't your hash.  What's the most generic behavior to expect?
    |       256584 [robert.dober] I do not recall having dismissed you at all? I have mad a judgement
    + 256369 [aljoscha wei] Mhm. I thought IO#select is mixed in from the module Kernel, not
      256374 [dblack wobbl] The question, though, is the representation of the "set".  Any class
      256377 [aljoscha wei] Why, of all possibities, an Array? Why not an Hash or any other class
      + 256383 [dblack wobbl] But its functionality is only in Array because Array mixes in
      + 256385 [robert.dober] Alexander I agree with your POV, however maybe it would do this
        256401 [transfire gm] I can think of two potential solutions to this issue. Either require a
        + 256407 [aljoscha wei] I agree. And the implementation of << would be the
        + 256411 [aljoscha wei] I agree, that seems to solve the problem very elegantly.
        + 256414 [robert.dober] It is a conceptional beauty but it really sucks for performance, there
        | + 256415 [robert.dober] make this *incompatibility* please
        | + 256423 [aljoscha wei] Why is that? Isn't the current implementation doing something
        |   256427 [caduceass gm] A duck is a bird.  It doesn't behave exactly like every other bird you
        |   + 256432 [aljoscha wei] I am on your side up to here :-)
        |   | 256438 [caduceass gm] Sure.  Why does [1,2,3].delete(3) return the integer 3 instead of the
        |   + 256436 [Rob AgileCon] What no one seems to have (directly) focussed on is that Hash#each
        |     256441 [caduceass gm] Wow.  Even though I've dealt with this all the time, that thought
        |     256445 [transfire gm] That's right. And if you wanted things to be "just ducky", it would
        |     + 256464 [caduceass gm] Regardless of what we think is the best, it's seems pretty clear to me
        |     | 256535 [alex blackke] That's one reason I'd like to see more #to_hash methods lying around.
        |     + 256905 [dblack wobbl] I don't think there's any reason to expect just the value when
        |       256946 [transfire gm] I don't necessarily disagree with you. I was following the natural
        + 256476 [nobu ruby-la] Classes which use Enumerable are not only Array and Hash.
        | 256489 [transfire gm] Hmm...well for the first solution, I suppose we need a special
        | 256518 [nobu ruby-la] I'd prefer this.
        + 256508 [dan-ml dan42] Why the compatibility breakage? The same could be implemented to be

^ where to place class files?
256305 [onebitcipher] mynewclass.rb.  I then placed this file inside
256359 [AEtzold gmx.] Dear Nathan,
256396 [onebitcipher] The new_script.rb is saved in my home directory, however the

^ class << self idiom
256307 [gerases gmai] I have trouble understanding the need for the class << self idiom. For
256328 [gerases gmai] You're completely right and I understand my mistake now. Thanks for

^ Code Critique: check if int or float
256309 [oliver.saund] I'm really starting to like this language. I'm working towards building
+ 256312 [marcel verni] => 3
+ 256314 [TimHunter nc] Integer("1") is okay.
  256318 [oliver.saund] Thanks Tim and Marcel.
  + 256403 [sam powersou] I found that you pick them up quickly and it isn't any harder than
  | 256408 [dblack wobbl] That's really the main point.  It's not a matter of being converted to
  + 256417 [robert.dober] They are just not the same,
    256420 [oliver.saund] Yes but /^\d+/ isn't the same as /^-?\d+$/.
    256422 [robert.dober] oops, well spotted, but that will not change a lot...

^ Do You Understand Regular Expressions?
256310 [growlatoe ya] I'm pretty new to Ruby and that sort of thing, and I'm having a few
+ 256313 [TimHunter nc] Try anchoring the match: /^.*/
+ 256317 [AEtzold gmx.] String.scan searches for all occurrences of (any number of any
  256324 [dan-ml dan42] That doesn't really explain why the regexp finds an extra empty string.
  + 256330 [list.rb gmai] "hello".scan(/..*/)
  + 256337 [ryemcdonald ] I agree. Can someone explain why gsub, sub or scan matches with * are
  | 256356 [kh.wild wico] irb(main):024:0> "hello".gsub( /([aeiou])/, "<\\1>" )
  | 256400 [lojicdotcom ] Why not simply change the 1 to a 0 ?
  + 256386 [sdball gmail] It's because the pattern /.*/ matches everything, including the
  | + 256390 [Rob AgileCon] That still doesn't really explain why "hello".scan(/.*/) => ["hello",
  | | + 256561 [skoot ideico] =20
  | | | 256574 [Rob AgileCon] A great example which I *do* consider to be buggy.  The similar
  | | + 256575 [shortcutter ] As far as I remember it works like this: first .* matches the whole
  | + 256394 [dblack wobbl] It's the other way around, though; it matches "hello" *first*, and
  |   + 256418 [sdball gmail] "hello".scan(/.*$/)
  |   | + 256419 [dblack wobbl] Yes, that was what I was mostly going by :-)
  |   | + 256434 [sami.samhuri] ^ anchors the match to beginning of a line or the beginning of the
  |   + 256570 [growlatoe ya] Oh right, I think I get it now. If you try to match anything with *
  |     256576 [shortcutter ] ".*" has its use but it's generally overrated, i.e. more often used than
  + 256433 [ajalkane gma] At face value it is a surprising result, but upon a bit of

^ Problems executing example code from xruby
256316 [AEtzold gmx.] Dear all,
256379 [lparravi gma] Haven't used xruby myself but com.xruby.runtime.lang.RubyProgram

^ unsubscribe
256320 [tru_crew12 y] thank you.
256395 [gregory.t.br] wrong place.

^ strange ... I'm getting crazy
256322 [joaomiguel.p] str = "teste@test.com, alf@test.com, joe@teste.com"
+ 256323 [fxn hashref.] There's a space after each comma in str that the regexp does not
| 256327 [joaomiguel.p] God bless you. you're right I'm stupid
+ 256325 [dblack wobbl] ["teste@test.com", " alf@test.com", " joe@teste.com"]
| 256329 [dblack wobbl] No I don't; please ignore.
+ 256326 [marcel verni] "teste@test.com, alf@test.com, joe@teste.com".split(',')

^ Re: eval going boom
256338 [lists bertra] Maybe #{value.inspect} is better or even

^ Qt::QFileDialog problem
256339 [darkintent g] If more details are required let me know.
256373 [d_rems yahoo] newfile=Qt::FileDialog.new
256499 [darkintent g] I did manage to get the dialog to come up however I can't seem to get

^ Listing of hosts in a LAN or domain name group?
256340 [GGarramuno a] What's the preferred ruby way of listing hosts in a LAN or within a

^ Re: Log file doesn't show message
256341 [cuiguy linux] unsubscribe

^ Open Doc/Open XML library
256342 [michaelst gm] Is there any library for creating "open document" or/and "open XML"
256344 [alin.popa gm] Regards,
256347 [alin.popa gm] Sorry,
256768 [michaelst gm] Any other options available?

^ Two Problems From a Newbie
256343 [danielj slee] def mtdarry
+ 256346 [danielj slee] just to be perfectly clear, i mean that i don't understand why it is 6
| + 256350 [come.news fr] Quite simple: The times methods iterates ten times from 0 to 9.
| + 256351 [alexg kuicr.] It would be easier to explain if you said what you *are* expecting to
+ 256349 [m_goldberg a] <code>
+ 256440 [stefan mahli] Others have answered your first question ...
+ 256488 [kaldrenon gm] Don't know if this pertains to your problem, since you haven't said

^ All in MiniExifTool
256348 [rubyforum we] I wanted to list all the EXIF data for a photo. Is there a method for
256439 [frdrch web.d] You can use the method tags, which returns an array of all tags of the file.
256494 [rubyforum we] Thanks, that worked. I changed one line to
+ 256497 [rubyforum we] Forgot to add that this method is better than the exiftool -h, because
+ 256606 [frdrch web.d] Sorry, my mistake.

^ ruby-ldap-0.9.7-1.i386 on windows
256355 [marcomolinar] but I have some problem to find on line what is the correct way to
+ 256358 [florian.assm] ruby, since there no real examples howto create a server provided in its
+ 256360 [AEtzold gmx.] Dear Marco,
+ 256366 [garbagecat10] Unless you have a specific need to use the compiled LDAP library, you might

^ Calling Ruby from within Ruby under Windows
256378 [ronald.fisch] Ruby 1.8.6 after installation has associated the file extension .rb
256482 [nobu ruby-la] Not a bug.  Cmd.exe uses ShellExecute or similar, which see the
256552 [ronald.fisch] I understand.

^ Help needed with my grid and code
256380 [tillaart36 h] Hey guys,
256381 [tillaart36 h] So i adjusted some of my code and now it is a little bit better...the

^ [SUMMARY] Verbal Arithmetic (#128)
256382 [james graypr] I'm always impressed by the creativity of the solutions, but I think this week

^ how to installed ruby in diffrent directory
256387 [ting.zhang d] I am new to ruby, I want to installed ruby on workstation. But I am not  a
+ 256389 [mark ociweb.] ...
+ 256391 [mark ociweb.] ...
+ 256393 [felipe.contr] ./configure --prefix=$HOME/ruby?
  256397 [ting.zhang d] Thanks! It works.

^ Problem executing example code from XRuby (was Re: where to place class files?)
256404 [jgabrielygal] I haven't tested anything but a quick glance at the explanation in the
256783 [AEtzold gmx.] Thank you very much, Jesų¸ !

^ RSS feed for this group?
256405 [rubyforum we] Is there an RSS feed for the Ruby group as hosted on www.ruby-forum.com
256409 [tim.pease gm] I would recommend grabbing the feed from the Google Groups website ...

^ Performing $SAFE checks with test-unit
256413 [djberg96 gma] Is there a way to perform $SAFE checks with test-unit? I tried this
256483 [nobu ruby-la] def test_replace_in_safe_mode
256485 [djberg96 gma] Nice, thanks Nobu. Perhaps all assertions should run in anonymous

^ undefined method 'a=' when initializing an object
256424 [bparanj gmai] I have an array of strings that contains the values for attributes of
+ 256443 [gregory.t.br] Please do not use eval() unless you have a good reason to!  It's very
| 256444 [bparanj gmai] I have an array that contains list of attributes of a ActiveRecord
| 256446 [gregory.t.br] Are you trying to set the values on an instance of Foo, or on a model instance?
| 256449 [bparanj gmai] Thanks Greg, your suggestion worked. Ruby community support rocks!
+ 256452 [rking panopt] Is this what you're looking for?

^ Reflecting on methods
256425 [cypher.dp gm] I'm a little bit confused about the right way to get the methods of a
256501 [rking panopt] You are calling .protected_methods and .private_methods on the Test
256515 [cypher.dp gm] Yeah, that's it !!!

^ Ruby extensions question..
256426 [beingthexemp] So I'm getting slightly confused with writing ruby extensions and what
256430 [james.d.mast] The performance improvement is not found in the Ruby interface to C
256442 [beingthexemp] Thanks that helps.
256450 [mental rydia] Usually not much.  Local variables are a little cheaper, and there's no AST-walking for evaluation, but that's about the extent of it.  Ruby method calls are a lot more expensive, so the big wins are when you can avoid Ruby method calls (i.e. rb_funcall) altogether.  Otherwise, it's just not worth the maintainability and portability problems.
256469 [beingthexemp] Thanks, helps more. I think where I'm going with this is that its best
256473 [mental rydia] I'd actually say it's the other way around -- write the program in Ruby, then
256493 [beingthexemp] Thanks, Yes I have the ruby application RubyAMF already done. But I'm
256503 [mental rydia] Ah, {de,}serialization code is one of those places where C is more often helpful.
256522 [beingthexemp] Hm. I haven't thought about JRuby or Ruby.NET. Don't know if it's
+ 256527 [beingthexemp] oh, if you haven't seen ruby-prof or call graphs.. you can google "ruby
+ 256531 [mental rydia] Yeah, it does indeed look like the serializer is a good candidate for a
  256532 [beingthexemp] 33.45    11.50     11.31    11.31     0.00  5159152     0.00     0.00
  + 256533 [beingthexemp] oh sorry. that String#== line is in the mysql_3000_flat.txt profile
  + 256587 [mental rydia] I didn't have much time to look at the profile carefully last night, but the
    256591 [beingthexemp] Interesting, I'll get that set up and test some more. I've also got
    256963 [beingthexemp] Hey mental,
    258522 [cfis savagex] Not sure if you still need this.  But he newest version of ruby-prof,