From: serialhex Date: 2011-08-10T03:52:59+09:00 Subject: *WHY* does this not work? --0015176f07a8721f0804aa1712ce Content-Type: text/plain; charset=ISO-8859-1 ok, so code: str = 'foo' => "foo" str.each_char do |c| c = 'x' end => "foo" WHY does str == 'foo' still?? i would expect it to be 'xxx'! this makes no sense, and is *QUITE* annoying... i end up having to do things like this: ... i CAN'T do things like that for a string because it dsn't seem to do that, but for an array i'd have to: ary = ['f', 'o', 'o'] => ["f", "o", "o"] ary.each_index do |i| ary[i] = 'x' end => ["x", "x", "x"] GAH!!! least surprise?? least surprise my FOOT!!! even if there was a *.each! method to do that i would be fine, *that* would be ok, none of this 'get the index and then do what you need to do and *THEN* set the stupid block variable.... GRRRRRR!!!! /vent hex -- my blog is cooler than yours: serialhex.github.com The wise man said: "Never argue with an idiot. They bring you down to their level and beat you with experience." > > Other than the fact Linux has a cool name, could someone explain why I > > should use Linux over BSD? > > No. That's it. The cool name, that is. We worked very hard on > creating a name that would appeal to the majority of people, and it > certainly paid off: thousands of people are using linux just to be able > to say "OS/2? Hah. I've got Linux. What a cool name". 386BSD made the > mistake of putting a lot of numbers and weird abbreviations into the > name, and is scaring away a lot of people just because it sounds too > technical. -- Linus Torvalds' follow-up to a question about Linux --0015176f07a8721f0804aa1712ce--