PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, July 17, 2022

[FIXED] How do I prevent the "parenthesis after method name" warning from ruby -w

 July 17, 2022     ruby, warnings     No comments   

Issue

I would like to have my script able to run without warnings. What is the proper Ruby syntax to avoid warnings like this? Thanks! --Myles

def absolutize_all_config_var_paths (in_var)
  ...
end

ruby -w ./scripts/run_flow
./scripts/run_flow:742: warning: parentheses after method name is interpreted as an argument list, not a decomposed argument

Ruby version ruby 2.4.1p111


Solution

Remove the space between the method name and opening bracket:

def absolutize_all_config_var_paths(in_var)
  ...
end


Answered By - Sagar Pandya
Answer Checked By - Pedro (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing