[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: instance_eva()l-ing a proc with parameters

Gennady Bystritsky

10/2/2006 7:16:00 PM

Logan Capaldo wrote:
> On Tue, Oct 03, 2006 at 01:35:48AM +0900, Gennady Bystritsky wrote:
>> Dear friends,
>>
>> I need to evaluate a proc within an instance context and would like
>> to pass it a parameter. The only straight forward way I found is to
>> use instance_eval(), however it does not allow to pass parameters to
>> a proc, only the instance itself is passed as a single parameter:
> Google for instance_exec, there are various and sundry
> implementations, including one built into rails.
>
> http://eigenclass.org/hiki.rb?ins... has various
> implementations and their respective strengths and weaknesses. Or you
> can
> just use ruby
> 1.9 where it's part of the core.

Thanks a lot, Logan. That's exactly what I need and what I have missed
completely here on the list when the discussion first came up.

It looks like I am better off sticking to my define_method() custom
solution for now, as instance_exec() uses the same approach anyway.

Thanks again,
Gennady.

3 Answers

Barack Hussein Bohica

7/3/2012 11:05:00 AM

0

On Mon, 2 Jul 2012 08:53:39 -0500, "Sanders Kaufman"
<[bucky@kaufman.net]> wrote:

>"254 murdered in Obama's 'organized communities'" wrote in message
>news:o8j2v7p3ok0iisb6i8p4011q1imbk3ulf6@4ax.com...
>
>It's just after the first, and every 2 minutes for an hour you posted
>another one or two line tantrum.
>What's the matter - cops won't let you shout at cars from the intersection,
>anymore?

Projecting your hobbies again.

Barack Hussein Bohica

7/3/2012 11:11:00 AM

0

On Mon, 02 Jul 2012 11:25:40 -0700, Billy <wildbilly@withoutta.net>
wrote:

>In article <o8j2v7p3ok0iisb6i8p4011q1imbk3ulf6@4ax.com>,
> 254 murdered in Obama's 'organized communities'
> <CharlieFoxtrot@whitehouse.gov> wrote:
>
>> On Sun, 01 Jul 2012 22:15:07 -0500, Mitchell Holman
>> <nomailcomcast.net> wrote:
>>
>> >250 murdered in Obama's 'organized communities'
>> ><CharlieFoxtrot@whitehouse.gov> wrote in
>> >news:h2hsu7pnmuqjsv9gjrbc2uvfqs88uvnl2m@4ax.com:
>> >
>> >> On Thu, 28 Jun 2012 08:02:30 -0500, Mitchell Holman
>> >> <nomailcomcast.net> wrote:
>> >>
>> >>> Are you sure you want to go down this Red state/Blue State path?
>> >>
>> >> 250 murders so far this year alone in the Obama-organized communities
>> >> of Chicago. And he can't even be bothered to read a boiler-plate
>> >> comment off a teleprompter about it.
>> >>
>> >
>> >
>> > And yet the only convicted criminal to become
>> >president is a Republican, Bush. Who appointed
>> >a fellow convicted criminal Cheney as his VP.
>>
>> Just take a look at the herd of nutjobs Obama has been mentored,
>> spiritually guided, and advised by. And don't count on Barky Hussein
>> not being tried for serious crimes before his term ends in a few
>> months.
>>
>> Were the 22nd amendment to vanish today, Bush or Cheney could beat
>> Obama without lifting a finger.
>>
>> > So much for the party of "law and order".........
>>
>> You favorite TV show to jack-off to, no doubt. Or has that been
>> replaced by the new moonbat wetdream, "Newsroom"?
>
>Yeah, you see Bush, and Cheney out there stumpin' with Romney all the
>time.
>
>There's no reason for you to worry about my "junk",

Good. Electron microscope is in the shop, anyway.

>try and stay on topic. What's Newsroom?

New HBO TV libtripe by the same guy that created old "West Wing" TV
libtripe. DemocRat version of the old MAD magazine "What I should
have said..." wishful rewriting of history. Good for an unintended
laugh.

Billy

7/3/2012 7:40:00 PM

0

In article <77k5v75g99bm4ve2emtered2k0paa95bd5@4ax.com>,
254 murdered in Obama's 'organized communities'
<CharlieFoxtrot@whitehouse.gov> wrote:

> On Mon, 2 Jul 2012 17:58:47 -0700 (PDT), Yer Pal Al
> <caddyshack.al@gmail.com> wrote:
>
> >On Jul 2, 2:31?pm, llano estacado <conqu...@do.res> wrote:
> >> Yer Pal Al wrote:
> >> > On Jul 2, 12:40 pm, re-Pete <g...@in.valid> wrote:
> >> >> Yer Pal Al wrote:
> >> >>> On Jul 2, 8:38 am, re-Pete <g...@in.valid> wrote:
> >> >>>> Sanders Kaufman wrote:
> >> >>>>> "re-Pete" ?wrote in messagenews:jsr8b2$ruf$1@dont-email.me...
> >>
> >> >>>>>> What was he "convicted" of, dipshit?
> >>
> >> >>>>> So - you're like the only person on the planet who doesn't know
> >> >>>>> George
> >> >>>>> Bush was convicted of drunk driving, eh?
> >>
> >> >>>> News to me, how old was he?
> >>
> >> >>> He was 30 and plead guilty to DUI:
> >> >>>http://articles.cnn.com/2000-11-02/politics/bush.dui_1_arre......
> >>
> >> >>> Bush is not getting my vote.
> >>
> >> >> Dear oh dear, I'm certain that will greatly trouble him...
> >>
> >> > It should. BO ran against him 2008 and he didn't win that year.
> >>
> >> I feel like you're trying to tell us he can not win...
> >
> >Some will tell you he *NEVER* won.
>
> Yeah, but those folks are mostly just fun to laugh at.

<http://www.salon.com/2000/12/04/voter...
Florida?s flawed ?voter-cleansing? program
Secretary of State Katherine Harris hired a firm to vet the rolls for
felons, but that may have wrongly kept thousands, particularly blacks,
from casting ballots.

--
E Pluribus Unum

Know where your money is tonight?
It's making the lives of Wall Street Bankers more comfortable.


The GOP is chasing us towards a cliff called "Obama."
Vote 3rd Party