class Example
def initialize(@this_AT_in_the_begining_is_something_Ruby_chokes)
end
end
=begin
Outputs with my old Ruby:
parse_example_1.rb:2: parse error
def initialize(@this_AT_in_the_begining_is_something_Ruby_chokes)
^
Maybe one can use this as a patch. (Took against my old Ruby.)
--- parse.y Thu Apr 13 10:17:20 2000
+++ parse.y.2 Fri Jun 30 01:36:20 2000
@@ -1583,9 +1583,21 @@
$$ = NEW_ARGS(0, 0, -1);
}
-f_norm_arg : tCONSTANT
+f_norm_arg : tCONSTANT
{
- yyerror("formal argument must not be constant");
+ yyerror("formal argument cannot be a constant");
+ }
+ | tIVAR
+ {
+ yyerror("formal argument cannot be an instance
variable");
+ }
+ | tGVAR
+ {
+ yyerror("formal argument cannot be a global
variable");
+ }
+ | tCVAR
+ {
+ yyerror("formal argument cannot be a class
variable");
}
| tIDENTIFIER
{
Outputs now:
parse_example_1.rb:2: formal argument cannot be an instance variable
def initialize(@this_AT_in_the_begining_is_something_Ruby_chokes)
^
=end