flag = true
begin
sam.play_it
x = 0/0 if flag
rescue
flag = false
retry
end
As the (self-proclaimed) resident Casablanca buff, I feel compelled to point out that this is not a true movie quote. Though wildly popular, it does not occur in the film.
I think the distinction is whether Sam it asked to merely "Play it",
or to "Play it again". (People often misquote the line from the movie
as "Play it again, Sam.")
In Hal's original code, Sam's gonna play it twice (i.e. once, and then
"again"). Now, if you were to change the initial value of "flag" to
"false" in Hal's program, Sam will only play it once.
P.S. Sometimes I think I'm becoming a more hip and well-rounded
individual and then I post messages like this that remind me of just
how much of a nerd I really am.
···
On Apr 7, 2005 3:16 AM, Peter Reilly <peterreilly@apache.org> wrote:
James Edward Gray II wrote:
> On Apr 6, 2005, at 12:27 AM, Hal Fulton wrote:
>
>> flag = true
>> begin
>> sam.play_it
>> x = 0/0 if flag
>> rescue
>> flag = false
>> retry
>> end
>
>
> As the (self-proclaimed) resident Casablanca buff, I feel compelled to
> point out that this is not a true movie quote. Though wildly popular,
> it does not occur in the film.
Hi!
Here's my contribution to the budding area of movie prototyping in Ruby:
people.each do |p|
p.visible = true if p.dead?
end
self.name = "bond"
self.name[0,1] = "james "
self.great(:responsibility) if self.great(:power)
Object.new.stop(self)
The movies are at the Wiki page.
Okay, back to regular programming now.
-Shajith
···
On Apr 7, 2005 6:24 PM, Lyle Johnson <lyle.johnson@gmail.com> wrote:
On Apr 7, 2005 3:16 AM, Peter Reilly <peterreilly@apache.org> wrote:
> James Edward Gray II wrote:
>
> > On Apr 6, 2005, at 12:27 AM, Hal Fulton wrote:
> >
> >> flag = true
> >> begin
> >> sam.play_it
> >> x = 0/0 if flag
> >> rescue
> >> flag = false
> >> retry
> >> end
> >
> >
I don't think so, but this instance definitively has some special
properties.
--
"Despite the surge of power you feel upon learning Ruby,
resist the urge to trip others or slap them in the bald head.
DO NOT LORD YOUR RUBYNESS OVER OTHERS!"
- Why the Lucky Stiff