Fishing in Ruby

sea =<<END_OF_SEA

<}}}}*> ><}}}}*> ><}}}}*>

       ><}}}}*>
                ><}}}}*> ><}}}}*>
   ><}}}}*>

END_OF_SEA

fish_caught = sea.scan(%><}}}}*>)
"I got #{fish_caught.size} fish!" # => "I got 7 fish!"

Please don't overfish.

-- Fisherman

···

--
Posted via http://www.ruby-forum.com/\.

Hi --

···

On Fri, 28 Apr 2006, A Fisherman wrote:

sea =<<END_OF_SEA

<}}}}*> ><}}}}*> ><}}}}*>

      ><}}}}*>
               ><}}}}*> ><}}}}*>
  ><}}}}*>

END_OF_SEA

fish_caught = sea.scan(%><}}}}*>)
"I got #{fish_caught.size} fish!" # => "I got 7 fish!"

But does it scale?

David

--
David A. Black (dblack@wobblini.net)
Ruby Power and Light, LLC (http://www.rubypowerandlight.com)

"Ruby for Rails" PDF now on sale! Ruby for Rails
Paper version coming in early May!

A Fisherman wrote:

fish_caught = sea.scan(%><}}}}*>)

Just as I thought: Your code doesn't run. :wink:

irb(main):088:0> fish_caught = sea.scan(%><}}}}*>)
irb(main):089:1"

This works, though:

fish_caught = sea.scan("><}}}}*>")

/me supposes he's taking this far too seriously...

Pistos

···

--
Posted via http://www.ruby-forum.com/\.

Are you doing this for the halibut? ha!

-A

···

-----Original Message-----
From: dblack@rubypal.com [mailto:dblack@rubypal.com]On Behalf Of
dblack@wobblini.net
Sent: Thursday, April 27, 2006 3:26 PM
To: ruby-talk ML
Subject: Re: Fishing in Ruby

Hi --

On Fri, 28 Apr 2006, A Fisherman wrote:

sea =<<END_OF_SEA

<}}}}*> ><}}}}*> ><}}}}*>

      ><}}}}*>
               ><}}}}*> ><}}}}*>
  ><}}}}*>

END_OF_SEA

fish_caught = sea.scan(%><}}}}*>)
"I got #{fish_caught.size} fish!" # => "I got 7 fish!"

But does it scale?

David

--
David A. Black (dblack@wobblini.net)
Ruby Power and Light, LLC (http://www.rubypowerandlight.com)

"Ruby for Rails" PDF now on sale! Ruby for Rails
Paper version coming in early May!

unknown wrote:

"I got #{fish_caught.size} fish!" # => "I got 7 fish!"

But does it scale?

Now THAT was a groaner if I ever saw one. :wink: hehehe

Pistos

···

--
Posted via http://www.ruby-forum.com/\.

Pistos Christou wrote:

A Fisherman wrote:

fish_caught = sea.scan(%><}}}}*>)

Just as I thought: Your code doesn't run. :wink:

irb(main):088:0> fish_caught = sea.scan(%><}}}}*>)
irb(main):089:1"

This works, though:

fish_caught = sea.scan("><}}}}*>")

/me supposes he's taking this far too seriously...

IRB can't handle the fish. It runs reel well using regular ruby command.

···

--
Posted via http://www.ruby-forum.com/\.

so your not fishing off the same platform?

···

-----Original Message-----
From: list-bounce@example.com [mailto:list-bounce@example.com]On Behalf Of A Fisherman
Sent: Thursday, April 27, 2006 4:55 PM
To: ruby-talk ML
Subject: Re: Fishing in Ruby

Pistos Christou wrote:

A Fisherman wrote:

fish_caught = sea.scan(%><}}}}*>)

Just as I thought: Your code doesn't run. :wink:

irb(main):088:0> fish_caught = sea.scan(%><}}}}*>)
irb(main):089:1"

This works, though:

fish_caught = sea.scan("><}}}}*>")

/me supposes he's taking this far too seriously...

IRB can't handle the fish. It runs reel well using regular ruby command.

--
Posted via http://www.ruby-forum.com/\.

A Fisherman wrote:

Pistos Christou wrote:

fish_caught = sea.scan(%><}}}}*>)

IRB can't handle the fish. It runs reel well using regular ruby command.

Can someone explain what's happening with the line, then? Is it using
the '>' as the delimiter? So it's sort of chopping off the "snout" of
each fish?

Pistos

···

--
Posted via http://www.ruby-forum.com/\.

Perhaps the original poster was just fishing for compliments.

···

On 4/28/06, Alan Fritz <Alan.Fritz@york.com> wrote:

so your not fishing off the same platform?

-----Original Message-----
From: list-bounce@example.com [mailto:list-bounce@example.com]On Behalf Of
A Fisherman
Sent: Thursday, April 27, 2006 4:55 PM
To: ruby-talk ML
Subject: Re: Fishing in Ruby

Pistos Christou wrote:
> A Fisherman wrote:
>> fish_caught = sea.scan(%><}}}}*>)
>
> Just as I thought: Your code doesn't run. :wink:
>
> irb(main):088:0> fish_caught = sea.scan(%><}}}}*>)
> irb(main):089:1"
>
> This works, though:
>
> fish_caught = sea.scan("><}}}}*>")
>
> /me supposes he's taking this far too seriously...

IRB can't handle the fish. It runs reel well using regular ruby command.

--
Posted via http://www.ruby-forum.com/\.

--
Daniel Baird
http://danielbaird.com (TiddlyW;nks! :: Whiteboard Koala :: Blog :: Things
That Suck)

I believe he was trolling

pth

···

On 4/27/06, Daniel Baird <danielbaird@gmail.com> wrote:

Perhaps the original poster was just fishing for compliments.

On 4/28/06, Alan Fritz <Alan.Fritz@york.com> wrote:
>
> so your not fishing off the same platform?
>
> -----Original Message-----
> From: list-bounce@example.com [mailto:list-bounce@example.com]On Behalf Of
> A Fisherman
> Sent: Thursday, April 27, 2006 4:55 PM
> To: ruby-talk ML
> Subject: Re: Fishing in Ruby
>
> Pistos Christou wrote:
> > A Fisherman wrote:
> >> fish_caught = sea.scan(%><}}}}*>)
> >
> > Just as I thought: Your code doesn't run. :wink:
> >
> > irb(main):088:0> fish_caught = sea.scan(%><}}}}*>)
> > irb(main):089:1"
> >
> > This works, though:
> >
> > fish_caught = sea.scan("><}}}}*>")
> >
> > /me supposes he's taking this far too seriously...
>
>
> IRB can't handle the fish. It runs reel well using regular ruby command.
>
> --
> Posted via http://www.ruby-forum.com/\.
>
>
>

--
Daniel Baird
http://danielbaird.com (TiddlyW;nks! :: Whiteboard Koala :: Blog :: Things
That Suck)