Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > crontab.rb:117: warning: tried to create Proc object without a block

Reply
Thread Tools

crontab.rb:117: warning: tried to create Proc object without a block

 
 
Une bévue
Guest
Posts: n/a
 
      08-02-2006
with crontab.rb:117:

i get a warning: tried to create Proc object without a block

line 117 being :
job = proc if iterator?

what could I change to avoid this warning ???
--
une bévue
 
Reply With Quote
 
 
 
 
ts
Guest
Posts: n/a
 
      08-02-2006
>>>>> "Y" == Yvon Thoraval <(E-Mail Removed)> writes:

Y> the file i've found "crontab.rb" is of 2001, may be that's the reason...=

yes,

svg% ./ruby -ve 'def a() j = proc if iterator?; p j end; a {}'
ruby 1.6.8 (2002-12-24) [i686-linux]
#<Proc:0xb7cb293c>
svg%

svg% ./ruby -ve 'def a() j = proc if iterator?; p j end; a {}'
ruby 1.8.0 (2003-08-04) [i686-linux]
-e:1: warning: tried to create Proc object without a block
#<Proc:0xb7d542b8@-e:1>
svg%

svg% ./ruby -ve 'def a() j = Proc.new if iterator?; p j end; a {}'
ruby 1.8.0 (2003-08-04) [i686-linux]
#<Proc:0xb7def2a4@-e:1>
svg%



Guy Decoux

 
Reply With Quote
 
 
 
 
Une bévue
Guest
Posts: n/a
 
      08-02-2006
ts <(E-Mail Removed)> wrote:

>
> svg% ./ruby -ve 'def a() j = proc if iterator?; p j end; a {}'
> ruby 1.6.8 (2002-12-24) [i686-linux]
> #<Proc:0xb7cb293c>
> svg%
>
> svg% ./ruby -ve 'def a() j = proc if iterator?; p j end; a {}'
> ruby 1.8.0 (2003-08-04) [i686-linux]
> -e:1: warning: tried to create Proc object without a block
> #<Proc:0xb7d542b8@-e:1>
> svg%
>
> svg% ./ruby -ve 'def a() j = Proc.new if iterator?; p j end; a {}'
> ruby 1.8.0 (2003-08-04) [i686-linux]
> #<Proc:0xb7def2a4@-e:1>
> svg%


fine, thanks !
--
une bévue
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"break" from a block and a proc object used in block position Wolfgang Nádasi-Donner Ruby 0 05-31-2007 06:05 PM
proc A def/calls proc B: variable scoping rules. NevilleDNZ Python 9 08-16-2006 04:36 AM
Convert VB.NET to TSQL PROC & Reference a Proc from another Proc David Lozzi ASP .Net 3 06-01-2005 06:35 PM
Why no Proc##[]=() ? Why no Proc##replace() ? Jean-Hugues ROBERT Ruby 14 05-05-2004 01:20 PM
What is the diff btwn 'sho proc' and 'sho proc cpu' William J King Cisco 1 12-18-2003 11:50 PM



Advertisments