diff --git a/lib/lrama/output.rb b/lib/lrama/output.rb index 757d16e2..2dcdae7b 100644 --- a/lib/lrama/output.rb +++ b/lib/lrama/output.rb @@ -252,7 +252,7 @@ def user_args end def extract_param_name(param) - /\A(\W*)([a-zA-Z0-9_]+)\z/.match(param.split.last)[2] + param[/\b([a-zA-Z0-9_]+)(?=\s*\z)/] end def parse_param_name