From: Dave Burt Date: 2005-06-05T23:00:26+09:00 Subject: Re: [QUIZ] [Solution] Whiteout (#34) "Robin Stocker" solved: > Here's my solution for Ruby Quiz #34. It's my first one :) Welcome to Ruby Quiz, Robin! Here's my solution, which is basically the same as Robin's. I must cite NegaPosi by SASADA Koichi for inspiration. http://www.dave.burt.id.au/ruby/whiteout.rb Known bug: "__END__" doesn't work in an eval'd string. No solution anticipated. NegaPosi has this problem too. Also, my Whiteout doesn't try and detect whether the given file is a valid whiteout file or not, so you'll get a syntax error if you "require 'whiteout'" with anything else other that a shebang and whitespace in the file. There's an interesting hack at the eval end of my script to make "if $0 == __FILE__" blocks work: eval "$0 = __FILE__; #{ Whiteout.decode(File.read($0)) }" Cheers, Dave