From: "Mauricio Fernández" Date: 2003-04-27T15:07:29+09:00 Subject: Re: Ruby misfeature? => CONTEST: solve the following problem --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by funfun.nagaokaut.ac.jp id h3R67Yd68207 On Sun, Apr 27, 2003 at 10:51:29AM +0900, Phil Tomson wrote: > OK, I'll admit to cheating by running this script... >=20 > I didn't see it print anything. This happens if you select it and then try to copy/paste '=E0 la X'; it seems this somehow strips away spaces and/or tabs. When posting I tried to simply copy the code w/ KClipboard and it kept swallowing significant spaces. I guess you'd have to extract the source code directly from the email, ie. save it and then edit everything else away. Or you might use the attached file :-) BTW, I'd expect this to behave differently on Windows because of the CR/LF issue... --=20 _ _ =20 | |__ __ _| |_ ___ _ __ ___ __ _ _ __ =20 | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \=20 | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com People disagree with me. I just ignore them. -- Linus Torvalds, regarding the use of C++ for the Linux kernel --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="a.rb" #raise "Gave up already?" def with(*objs, &block) objs.each { |o| o.instance_eval(&block) } end a = % b = % c = % d = % with a,b,c,d do case self when " "; puts "foo" when "\t"; puts "bar" when "\n"; puts "baz" end end --3V7upXqbjpZ4EhLz--