Are you sure that you don't have *args in your code instead of just args ?
In case of *args the warning makes sense...

--
Thanks & Regards,
Dhruva Sagar.



On Thu, Oct 7, 2010 at 07:44, Courtland Allen <courtlandallen / gmail.com>wrote:

> Hello,
>
> I've normally handled exceptions by "rescuing functions" in roughly this
> manner:
>
> def test_function(args)
>  puts "blah blah blah"
> rescue Exception=>e
>  puts "blah blah blah: #{args.inspect}"
> end
>
> However, I'm using a new IDE now that's giving me a warning about the
> reference to "args" in the rescue clause: "Local variable can be
> uninitialized." I figured that's impossible, since it's a required argument
> to the function. Should I just ignore the warning, or am I actually doing
> something wrong? I suppose the alternative would be:
>
> def test_function(args)
>  begin
>    puts "blah blah blah"
>  rescue Exception=>e
>    puts "blah blah blah: #{args.inspect}"
>  end
> end
>
>
> --
> *Courtland Allen*
>