8999-9356

8815-9155 subjects 9208-9739

making FileUtils.rm_rf robust: is anyone interested?
8999 [ruby@me er n] I see that FileUtils.rm_rf cannot handle a tree containing a
9005 [nobu@ru y- a] It doesn't feel appropriate to chdir inside a library since it affects
+ 9006 [hgs@dm .a .u] isn't it possible to pass a block to chdir, so that after executing the
+ 9008 [ruby@me er n] You are right that calling chdir (or fchdir) is not appropriate in
  + 9009 [Charles.O.Nu] I'm not sure how much weight this will carry, but since we ship Ruby's
  | + 9010 [vjoel@pa h. ] Then ruby's thread scheduler would have to chdir for each context
  | | 9011 [headius@he d] I agree that it makes more sense for the current dir to be
  | + 9013 [ruby@me er n] [resend]
  |   9019 [Charles.O.Nu] Either way we wouldn't really be able to support it, and we'd have to
  + 9012 [nobu@ru y- a] Thank you, I'll consider it later.

[ ruby-Patches-6026 ] net/imap chokes on NOMODSEQ response
9002 [noreply@ru y] Patches item #6026, was opened at 2006-10-04 20:25

[ ruby-Patches-6031 ] Bug in logger.rb rotation in multi-process environment
9004 [noreply@ru y] Patches item #6031, was opened at 2006-10-05 09:08

[ ruby-Bugs-6034 ] Documentation for String.scan has a bad example.
9007 [noreply@ru y] Bugs item #6034, was opened at 2006-10-05 09:56

[FEATURE REQUEST] C#'s ?? Operator
9014 [now@bi wi se] Can we please have the C# ?? operator in ruby?  It's so handy.
+ 9015 [pseudo.meta@] In a statically typed language, having nullness and falseness be
+ 9016 [matz@ru y- a] Do you mean making (a ?? b) as shorthand for (a.nil? ? a : b)?
  9017 [pseudo.meta@] I think the point he was trying to make was that (a ?? b) can be
  9018 [znmeb@ce ma ] 1. 'nil' and 'false' behave as false in Ruby; everything else behaves as

Bug: right shift (>>) for Bignum?
9020 [johan556@gm ] I think I have stumbled on a bug in the right shift method on Bignums.
9027 [matz@ru y- a] It is incredible to see a bug like this.  Thank you for finding it.

argument passing bug
9021 [matju@ar en ] ...
+ 9022 [dblack@wo bl] $ ruby -ve 'def foo(*x) x end; puts foo(*[42]*666).length'
| 9023 [dblack@wo bl] Never mind -- I realize (from IRC discussion) that matju was talking
+ 9025 [matju@ar en ] ...
+ 9026 [matz@ru y- a] Thank you for finding a bug.  I just fixed it.
  9028 [matju@ar en ] ...

[Fwd: cross-thread violation on rb_gc()]
9024 [sdate@ev re ] ...
+ 9064 [Daniel.Berge] Was there any change to the system() implementation on Windows between
| 9065 [sdate@ev re ] Hmmm ... I have not tried building Ruby on Windows from scratch for long
+ 9082 [usa@ga ba ec] Hmm, I cannot reproduce this problem.
  9227 [sdate@ev re ] Sorry, I somehow missed that ...
  9228 [nobu@ru y- a] Although I can't reproduce the problem too, it sounds like because
  9355 [nobu@ru y- a] Well, have I posted this patch?
  9356 [matz@ru y- a] Commit the fix, please.

[ ruby-Bugs-6066 ] REXML cannot parse encoding if space(s) exist around equal
9032 [noreply@ru y] Bugs item #6066, was opened at 2006-10-09 10:15

[ ruby-Bugs-6069 ] Monitor fails when used in classes supporting constructors
9038 [noreply@ru y] Bugs item #6069, was opened at 2006-10-09 09:45
9039 [fg@si me om ] def initialize

how to create a NODE_ARGSPUSH?
9077 [ryand-ruby@z] Is it possible for plain ruby code to create a NODE_ARGSPUSH? It
9078 [matz@ru y- a] Try following code in 1.9.
+ 9079 [ryand-ruby@z] thank you.
| 9081 [matz@ru y- a] Try 'foo[5,*[1]]=2'.
+ 9080 [nobu@ru y- a] And foo[*[1]] = 2 in 1.8?

[ ruby-Bugs-6090 ] Loop over array.delete breaks at first hit
9104 [noreply@ru y] Bugs item #6090, was opened at 2006-10-10 22:33
9105 [matz@ru y- a] Modifying iterating array inside the loop may fail.  Do it with your
9107 [ville.mattil] This rule seems to belong "the principle of the most surprise category".
9112 [ryand-ruby@z] In every good data structures book out there, the smalltalk style
9137 [meta@po ox c] ...
9153 [matz@ru y- a] You are right, except that array iteration does check memory boundary

[PATCH] ftp.rb - mget, mput, VERSION, rdoc
9106 [djberg96@gm ] The diff below adds the mget and mput methods, a VERSION constant and

[patch] REXML DTD read
9108 [matz@ru y- a] ...
9113 [ser@ge ma e-] charset="utf-8"

How to call WinAPI in ruby where the parameter I Pass is both Input and Output
9109 [madhusudan.n] ...
+ 9110 [jan.svitok@g] use api=Win32API.new("Kernel32","GetVersionEx",['P'],['L'])
+ 9111 [usa@ga ba ec] #####

[ ruby-Patches-6102 ] Date.parse raises NoMethodError
9116 [noreply@ru y] Patches item #6102, was opened at 2006-10-11 16:25
9170 [matz@ru y- a] The patch will be applied soon.  I have CC'ed to the date library

What about 'splay'?
9119 [dblack@wo bl] The word 'splay' occurs to me, as something that sounds sort of like
+ 9120 [Daniel.Berge] expand
| 9123 [dblack@wo bl] Well, yeah, but I thought "splay" uniquely bridged the
+ 9121 [alex@bl ck e] I keep thinking "unwind", but that's completely unidiomatic.  Don't know
+ 9122 [ruby-ml@ki t] David, you thought 'splat' was whimsical :P
| + 9126 [dblack@wo bl] I don't mean splay to be whimsical, though it does offer a bit of an
| + 9127 [ser@ge ma e-] Actually, "splay" has a well defined, non-whimsical, and appropriate
|   + 9128 [dblack@wo bl] Yes -- to clarify, in case it isn't clear -- splay is a real word.
|   | 9130 [robin@ni or ] But is it a noun? ;)
|   | 9133 [dblack@wo bl] That's a bit of a sticking point when you add the to_, I guess.  The
|   | + 9145 [ser@ge ma e-] I don't want to come across as a "splay" advocate... I don't have much
|   | + 9166 [dave@bu t. d] Please allow me to disagree. We can and currently do use to_a, and I do
|   |   9167 [dblack@wo bl] I think that means you're agreeing :-)
|   |   + 9174 [rick.denatal] And as you know, I'm in the same camp.
|   |   | 9175 [rick.denatal] I went back and checked, and _why's case trick for arrays does work under 1.9.
|   |   + 9176 [dave@bu t. d] Agreeing with your previously-stated position, yes. Only disagreeing
|   + 9131 [ruby-ml@ki t] 'splay' holds no intuitive advantage of clarity over 'splat'--in
|   | + 9132 [james@gr yp ] I'm afraid I have to agree with that line of thought.
|   | + 9134 [dblack@wo bl] I'm not looking for intuitiveness; it's OK if people have to learn a
|   | | 9136 [ruby-ml@ki t] *[1,2]  =3D> 1,2
|   | | + 9138 [gwtmp01@ma .] The splat operator has language semantics that go beyond the mapping
|   | | | 9172 [rick.denatal] That would require other language changes since
|   | | + 9139 [dblack@wo bl] The thing is, though, the method hook isn't actually doing the *
|   | + 9135 [billk@ct .c ] I like *@ too.
|   | + 9146 [ser@ge ma e-] I hereby magnanimously offer to let the method be called "to_sean".  It
|   + 9151 [steven@lu os] splat, v. 1. trans. To cut up, to split open; esp. [a fish] (Obs.)
+ 9129 [now@bi wi se] And how about splay trees?  I'd say it's not great to use a word that
| 9185 [now@bi wi se] Did this mail get through?  I thought #destructure was a rather good
| 9186 [dblack@wo bl] There's still the problem (which affects 'unarray' too) that the
| 9187 [now@bi wi se] I realize that, but you're destructuring whatever data you have into
+ 9141 [jmg3000@gm i] "splay" has a couple of possibly not-so-savory connotations, IMO.
| + 9156 [pseudo.meta@] It does to me. You may just as well have obj.to_goatse
| | 9161 [jim@fr ez .o] ...
| | 9162 [dblack@wo bl] That's my paraphrase of my understanding of Matz's explanation.  I'm
| + 9171 [rick.denatal] I had the same opinion. Seems to push my mind towards pornographic connotations.
|   9173 [yemi@we df s] I am new to discussing here. What about names like to_contents or
+ 9182 [drbrain@se m] No.

Splatting against the bikeshed
9142 [neil@ha ub .] My my my, this to_splat discussion is going on a long time.  This seems
+ 9143 [dblack@wo bl] I'm sorry you find it to be noise.  There's a pretty long history of
+ 9147 [ser@ge ma e-] This particular bike shed is going to be poured in concrete and anchored

regular expressions tainting?
9152 [hadmut@da is] I am writing a ruby skript running under libapache-ruby, with $SAFE >
9154 [nobu@ru y- a] I can't reproduce your result with your code.
9157 [hadmut@da is] $SAFE = 1
9159 [hadmut@da is] Lateron I do call a IPaddr.new with that (untainted) values, but again
9183 [hadmut@da is] I meanwhile have a program to reproduce the problem. Twice the same
9184 [drbrain@se m] Please attach the testcase.
9198 [hadmut@da is] OK, i have stripped down the testcase further. The program does not
9200 [nobu@ru y- a] OK, it is a bug related to taint flag of shared string.
9211 [hadmut@da is] Many thanks.
+ 9214 [nobu@ru y- a] なかだです。
+ 9215 [nobu@ru y- a] Sorry for mispost by misclick.
  9219 [nobu@ru y- a] A new patch.

[PATCH] Module#class_variable_defined?
9158 [ mfp@ac .o g] Module#class_variable_defined? doesn't match the documentation, making it
9165 [dblack@wo bl] s/an/a/ :-)
9168 [ mfp@ac .o g] ===================================================================
9169 [matz@ru y- a] The patch was merged.  Thank you.

[PATCH] Some RDoc fixes (Hash#identical, String#partition)
9160 [ mfp@ac .o g] As far as I can see String#partition doesn't take a block (unlike

Commit miss? Hash#identical vs. Hash#compare_by_identity
9163 [ mfp@ac .o g] Right now, I can see Hash#identical and Hash#identical? in CVS HEAD.
9164 [matz@ru y- a] It seems that somehow we lost the change.  Perhaps I made mistake

singleton : var_ref production and NEW_SELF
9177 [Thomas.Enebo] if (nd_type($1) == NODE_SELF) {
9180 [matz@ru y- a] Indeed.  This is useless.  I don't remember why I made it like this.

Readline patch
9178 [ruby-ml@ki t] I submitted a patch to Readline some time ago, but have seen
9320 [matz@ru y- a] Finally, I checked your patch.  Sorry for the delay.

[BUG] make check broken in ruby 1.8 CVS
9179 [ville.mattil] I'm building ruby as follows
9181 [nobu@ru y- a] Thank you, I forgot to fix it.
9189 [ville.mattil] I verified and now everthing works well.

Symbol < String in Ruby > 1.8
9188 [dblack@wo bl] I'm wondering if someone could summarize for me the rationale for
+ 9190 [rick.denatal] I guess that for one thing it's that there really isn't much harm in
| 9191 [dblack@wo bl] True, but that's also true of strings and integers.
| 9194 [rick.denatal] Except that there isn't a one-one relationship between equal valued
| 9196 [matz@ru y- a] Yes, insert ".lines" if you need Enumerable methods, e.g.
| 9202 [rick.denatal] I'm curious as to why it's a good thing to make String nonenumerable
| 9203 [james@gr yp ] Well, now that we're stepping into the M17N world it no longer makes
| + 9204 [ mfp@ac .o g] $/ = "."
| + 9206 [Daniel.Berge] I sometimes write methods that take a string or an array of strings and,
| + 9223 [rick.denatal] Well the new methods bytes, lines, and soon chars give you enumerators
+ 9192 [matz@ru y- a] * in preparation M17N enhancement, a symbol should contain encoding
  + 9193 [dblack@wo bl] Thanks for the info!  That's very helpful.
  | 9195 [matz@ru y- a] I think there's no reason to prohibit strings for these methods, so
  + 9212 [Charles.O.Nu] My understanding of symbols was primarily that they were an ID within
    + 9213 [drbrain@se m] In practice they are both.  More commonly the latter, in fact.
    + 9238 [Charles.O.Nu] Fair enough if Symbols are more like Strings that have identity, but
      + 9239 [jim@we ri hh] From a standpoint of the number of String methods available,  it looks
      | 9245 [Charles.O.Nu] As Sam mentions in another post...what then is the difference between a
      | + 9246 [dblack@wo bl] module Textual
      | | 9252 [Charles.O.Nu] I sure think it does. Perhaps
      | | 9253 [Charles.O.Nu] Even better, compare to the current complete list of methods for Symbol
      | + 9249 [rick.denatal] The main difference is that
      |   9251 [Charles.O.Nu] So then Symbol < String, except that it's frozen, and except that
      |   9254 [matz@ru y- a] Yes, Symbol is a Subclass of String that above two features added.
      + 9243 [sroberts@un ] What is the performance enhancement?
      + 9244 [sroberts@un ] What is the performance enhancement?
        9255 [matz@ru y- a] I had an idea that renaming Symbol to InternedString (and making
        9256 [sroberts@un ] Been working with lua recently (lua.org), it only has immutable strings,
        9257 [matz@ru y- a] Interesting.  All strings?  Is the result of string substitution, for
        + 9259 [sroberts@un ] Like earlier interpreted languages, such as Snobol [11] and Icon [10],
        | + 9275 [matz@ru y- a] Interesting.  Comparison should be much faster.  I am not sure how you
        | + 9276 [Thomas.Enebo] This is an interesting question (stuff between >> <<) to me also.   I
        + 9268 [tewk@te k. o] Java does this also.  The String class is immutable.
          9297 [meta@po ox c] And the resulting ugliness of string handling in Java is one of the
          9319 [Charles.O.Nu] This is not true. Java's String + is optimized by the compiler into
          9328 [meta@po ox c] Maybe not any more if you are using the latest Java, but the point

Ruby Threads
9197 [abhisek@ru y] I understand portability was the main reason for implementing Ruby's
+ 9199 [matz@ru y- a] Yes.  Wait for YARV.
| 9201 [ruby-core@wh] In addition, you can follow the recent `parallel` branch to see koichi's work on
+ 9210 [Charles.O.Nu] I would be remiss if I didn't mention that JRuby supports native threads

String not enumerable, what about IO? (was Re: Symbol < String in Ruby > 1.8)
9205 [sroberts@un ] Does this break duck-typing of String, IO, and Array?
+ 9207 [Daniel.Berge] Oops, I realized right after posting that Sam is expressing the same
+ 9218 [rick.denatal] It actually returns an Enumerable::Enumerator.
  + 9220 [nobu@ru y- a] /each.*/ !~ "lines".
  | 9225 [dblack@wo bl] What's the best way to get an array of lines or bytes from a string in
  | 9226 [james@gr yp ] str.lines.to_a
  | 9230 [dblack@wo bl] lines sounds like it should already be an array to me (like
  | 9231 [drbrain@se m] Creating a new Array for enumerating the lines of a 50M String is not
  | + 9232 [now@bi wi se] When would you actually do that?
  | | + 9233 [drbrain@se m] You trimmed too much context.
  | | | 9235 [now@bi wi se] And you trimmed too much answer.
  | | | 9260 [drbrain@se m] No, I didn't.
  | | | 9272 [now@bi wi se] What I meant was that you trimmed too much answer from the answer to
  | | + 9234 [meta@po ox c] If you mean "When would you enumerate the lines of a 50M String?", one
  | |   9236 [now@bi wi se] That's not what I meant.  Substitute "such a thing as creating a new
  | |   9237 [ mfp@ac .o g] e.g.
  | |   9240 [now@bi wi se] I'm missing something vital here.  Why would #lines return an array?
  | |   9242 [dblack@wo bl] I think so, but I think also my comment was misunderstood as "no
  | |   9247 [rick.denatal] Well, the idea of each* returning an enumerator if a block is not
  | |   + 9248 [dblack@wo bl] I know it's new in 1.9, and I don't like it.  I don't understand at
  | |   | 9258 [matz@ru y- a] Perhaps we wanted to say
  | |   | 9263 [dblack@wo bl] each still feels like an odd way to ask for an Enumerator.  I'd expect
  | |   | 9296 [meta@po ox c] I disagree. I think if you are OK with the idea of functions/methods
  | |   | 9301 [dblack@wo bl] I understand how it works technically; I really don't like "each" as a
  | |   + 9250 [jim@we ri hh] I think I disagree.  If lines without a block returns an array, then
  | |     9261 [dblack@wo bl] 1. Should there be a method to enumerate over the lines without
  | |     + 9262 [matz@ru y- a] The reason behind no to #2 is that readlines returns an array, right?
  | |     | 9264 [dblack@wo bl] I still think the naming is very unexpected.  I know it's
  | |     | + 9265 [matz@ru y- a] Hmm, maybe the name Enumerator does not make you feel like it's a
  | |     | | + 9266 [dblack@wo bl] Interesting.  That might indeed make it feel more like something I was
  | |     | | | 9269 [now@bi wi se] Yes!  Excellent!  That's the way I think of it, anyway.
  | |     | | + 9273 [rick.denatal] I was going to reply to David's post that an Enumerator can be viewed
  | |     | | | 9274 [ mfp@ac .o g] well,
  | |     | | + 9280 [hgs@dm .a .u] It seems to me to be behaving more like a generator, though you can
  | |     | + 9267 [now@bi wi se] I think it's rather nice, and it actually /is/ a collection of
  | |     | | 9277 [dblack@wo bl] Actually in my case it's the Ruby in me :-)
  | |     | | + 9278 [Daniel.Berge] Why do we need this when we already have IO.foreach?
  | |     | | + 9285 [now@bi wi se] But it /is/ a collection of lines.  And it works just fine without an
  | |     | |   + 9286 [now@bi wi se] Anyway, I'll leave this discussion alone now, I think.  Everyone knows
  | |     | |   + 9288 [dblack@wo bl] Let me rephrase my point, then: When I say "things", I expect a
  | |     | |     9289 [jim@we ri hh] \> I'd rather see lines return an array, and some other method return an
  | |     | |     + 9294 [matz@ru y- a] I think he assumes a "thins" should be more array-like than an
  | |     | |     | + 9295 [now@bi wi se] LazyArrayLikeThingGiver
  | |     | |     | + 9298 [rick.denatal] Maybe IndexedEnumerator?
  | |     | |     | + 9300 [dblack@wo bl] (Do you mean #lines?)
  | |     | |     | | + 9305 [matz@ru y- a] Yes.
  | |     | |     | | | 9306 [dblack@wo bl] It seems like a good way of namespace-splitting, so that arrays (my
  | |     | |     | | | 9308 [rick.denatal] {:a => :b, :c => :d}.each_key => ERROR NO BLOCK GIVEN
  | |     | |     | | | 9311 [dblack@wo bl] Yes.  I don't like each* without a block (but I think I'm fighting a
  | |     | |     | | | + 9314 [matz@ru y- a] I am (sort of) with you for this issue though.
  | |     | |     | | | | 9315 [dblack@wo bl] Just that I think that if we need multiple things to happen -- an
  | |     | |     | | | | 9327 [meta@po ox c] I agree.
  | |     | |     | | | + 9325 [rick.denatal] I don't really see the harm, as it doesn't seem incompatible with 1.8
  | |     | |     | | |   9326 [dblack@wo bl] We're going in circles at this point; see my earlier posts.
  | |     | |     | | + 9309 [sroberts@un ] This is identical to ruby1.8's string.each_line {}
  | |     | |     | |   + 9310 [halostatue@g] Because the problem is #lines, not #each_line. My understanding is
  | |     | |     | |   | 9313 [dblack@wo bl] I would certainly rather have no #lines than have it return an
  | |     | |     | |   + 9312 [dblack@wo bl] I personally think that by_ is a better choice for something that
  | |     | |     | + 9304 [steven@lu os] Arrazy!
  | |     | |     + 9299 [dblack@wo bl] teacher.students
  | |     | |       9302 [sroberts@un ] Me, either, especially when we already extend the #each_ methods to
  | |     | |       9307 [rick.denatal] Actually, I think that the right thing to do is something like this.
  | |     | + 9279 [halostatue@g] String#by_chars
  | |     |   9281 [dblack@wo bl] My initial impression is that that's a great idea.
  | |     |   9282 [michael.seli] I am fairly new to ruby, and I have just started listening to this mailing
  | |     |   9283 [dblack@wo bl] That's sort of the point :-)  All of the other enumerable methods --
  | |     |   9284 [michael.seli] In
  | |     |   + 9287 [dblack@wo bl] I think it's because they're not arrays, and not particularly
  | |     |   | 9290 [ser@ge ma e-] charset="iso-8859-1"
  | |     |   | 9291 [now@bi wi se] That's easy, getting the first character is still at index 0.  Just
  | |     |   | 9293 [now@bi wi se] Whatever do you mean?  For Arabic, the order of lines is the same,
  | |     |   + 9303 [sroberts@un ] Probably not more efficient, you have to build an Array internally to
  | |     |     9322 [michael.seli] be
  | |     + 9270 [ mfp@ac .o g] * defining String#to_enum, which would accept an argument (:lines, :chars or
  | |       9271 [now@bi wi se] I really don't like all this "explicit" casting that's going on.
  | + 9241 [dblack@wo bl] I'm talking about the method names, though.
  + 9229 [matz@ru y- a] Good point.  I will fix this.
threads.html
top