Forum: Ruby Fishing in Ruby

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A Fisherman (Guest)
on 2006-04-27 23:04
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
unknown (Guest)
on 2006-04-27 23:28
(Received via mailing list)
Hi --

On Fri, 28 Apr 2006, A Fisherman wrote:

> "I got #{fish_caught.size} fish!" # => "I got 7 fish!"
But does it scale?


David

--
David A. Black (removed_email_address@domain.invalid)
Ruby Power and Light, LLC (http://www.rubypowerandlight.com)

"Ruby for Rails" PDF now on sale!  http://www.manning.com/black
Paper version coming in early May!
Alan Fritz (Guest)
on 2006-04-27 23:34
(Received via mailing list)
Are you doing this for the halibut? ha!



-A
Pistos C. (Guest)
on 2006-04-28 00:32
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.  ;)  hehehe

Pistos
Pistos C. (Guest)
on 2006-04-28 00:35
A Fisherman wrote:
> fish_caught = sea.scan(%><}}}}*>)

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

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
A Fisherman (Guest)
on 2006-04-28 00:54
Pistos C. wrote:
> A Fisherman wrote:
>> fish_caught = sea.scan(%><}}}}*>)
>
> Just as I thought: Your code doesn't run.  ;)
>
> 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.
Alan Fritz (Guest)
on 2006-04-28 01:05
(Received via mailing list)
so your not fishing off the same platform?
Daniel B. (Guest)
on 2006-04-28 03:01
(Received via mailing list)
Perhaps the original poster was just fishing for compliments.
Patrick H. (Guest)
on 2006-04-28 03:31
(Received via mailing list)
On 4/27/06, Daniel B. <removed_email_address@domain.invalid> wrote:
> > To: ruby-talk ML
> > >
> > Posted via http://www.ruby-forum.com/.
>
I believe he was trolling

pth
Pistos C. (Guest)
on 2006-04-28 04:24
A Fisherman wrote:
> Pistos C. 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
This topic is locked and can not be replied to.