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

U

Une bévue

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 ???
 
T

ts

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
 
U

Une bévue

ts said:
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 !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,082
Latest member
KetonaraKetoACV

Latest Threads

Top