nobu
3bf1afbdd8
* include/ruby/intern.h (rb_make_backtrace, rb_make_exception):
...
used in ripper.
* node.h (rb_parser_{malloc,realloc,calloc,free}): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14 04:20:59 +00:00
nobu
2b1f8574c7
* include/ruby/encoding.h (rb_char_to_option_kcode): used in
...
ripper.
* node.h (rb_reserved_word): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-11 20:58:11 +00:00
nobu
aac4f022e2
* parse.y (parser_tokadd_escape): no similar messages twice.
...
[ruby-core:31048]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-08 03:41:30 +00:00
matz
b35f5db57e
* parse.y (void_expr_gen): add 'possibly' to warning message.
...
[ruby-core:31611]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05 08:18:32 +00:00
naruse
7175a9073e
* class.c, compile.c, dir.c, file.c, iseq.c, parse.y, random.c:
...
clean unused-value warnings.
* cont.c, process.c, vm_exec.h: clean cast warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-27 07:13:43 +00:00
nobu
3f606b9aca
* parse.y (local_push_gen): disable unused variable warnings in
...
eval. [ruby-dev:41869]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-21 06:00:25 +00:00
nobu
25b9eb5e57
* include/ruby/ruby.h (rb_data_type_t): restructured. [ruby-dev:41862]
...
add parent member.
* error.c (rb_typeddata_inherited_p): new function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-18 07:31:54 +00:00
nobu
2926a585ff
* parse.y (shadowing_lvar_gen): should add lvar to vars and
...
used. [ruby-dev:41666]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-22 10:57:40 +00:00
nobu
d31350f827
* id.c (Init_id): add underscore name.
...
* parse.y (warn_unused_var): ignore underscore name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-20 07:17:46 +00:00
nobu
14a15f8b7f
* parse.y (warn_unused_var): use same format as shadowing local
...
variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-20 06:14:22 +00:00
nobu
47fb01e35b
* parse.y (shadowing_lvar_gen): get rid of adding extra name for
...
shadowing local variable. [ruby-dev:41628]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-20 05:41:07 +00:00
naruse
86d72ac7cf
Revert "* parse.y (warn_unused_var): warn unused variables."
...
This reverts commit r28339 and r28340
because they prevents test-all on boron.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-17 01:04:09 +00:00
usa
4ac263ce68
* parse.y: ripper needs warn_unused_var(), too.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-16 09:35:35 +00:00
nobu
cf79bdc6d0
* parse.y (warn_unused_var): warn unused variables.
...
[ruby-dev:41620]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-16 09:20:14 +00:00
matz
276fb7e77b
* compile.c (iseq_compile_each): should consider block on stack,
...
if block argument is passed. [ruby-core:30534]
* parse.c (arg_concat_gen): should append to nd_head, not to
nd_iter for NODE_BLOCK_PASS.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-02 03:05:06 +00:00
nobu
5d394118ff
* parse.y (parser_tokadd_utf8, parser_tokadd_string): allow NUL
...
containing symbol literals, as well as String#to_sym.
[ruby-dev:41447]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-29 18:40:48 +00:00
nobu
bf36feb76d
* parse.y (warn_balanced, parser_yylex): no warnings after closing
...
parens.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-24 10:00:36 +00:00
nobu
39f09ca13f
* parse.y (warn_balanced): no warning for singleton class.
...
[ruby-core:30366]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-23 08:40:36 +00:00
mame
3cd67ce505
* parse.y (parser_read_escape, parser_tokadd_escape): allow a hex or
...
octal encoded character after \c. This seemed to be prohibited at
r13836, but its ChangeLog mentions nothing about this prohibition.
So I assume this prohibition is not intended. [ruby-core:27229]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-16 12:54:37 +00:00
nobu
8939436f24
* parse.y (warn_balanced): do not warn for EXPR_ENDFN.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-28 00:43:27 +00:00
nobu
422efe5352
* parse.y (parser_read_escape): deny extra character escapes.
...
[ruby-core:27228]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-27 01:54:23 +00:00
mame
56a18860da
* parse.y (program): check void_expr when rb_parse_in_main().
...
[ruby-dev:38717]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-26 15:09:26 +00:00
nobu
b0018f6859
* parse.y (ripper_get_value): escape Qundef.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-26 04:11:59 +00:00
nobu
3cbb849bbb
* parse.y (warn_balanced): warn according to last state.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-26 03:42:45 +00:00
nobu
36f8540a2b
* parse.y (warn_balanced): removed false warning.
...
* parse.y (parser_yylex): skip whitespaces after method name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-22 07:43:33 +00:00
nobu
2976ec58a4
* parse.y (regexp): check each fragments. [ruby-core:27374]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-21 04:44:58 +00:00
nobu
82ba40b434
* parse.y (parser_yylex): reverted r27388 due to backward
...
compatibility.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-21 04:36:05 +00:00
nobu
2e1efa9499
* parse.y (parser_yylex): warn confusing binary operators after
...
local variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-21 03:15:49 +00:00
nobu
f8e51f7e59
* parse.y (parser_yylex): abandoned EXPR_VCALL.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-21 02:31:40 +00:00
nobu
f0f87d6eeb
* parse.y (parser_yylex): fix for tLPAREN_ARG.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-20 10:25:52 +00:00
nobu
e63df53198
* parse.y (lex_state_e, IS_END, IS_SPCARG, parser_yylex): separate
...
the state after vcall. [ruby-core:29578]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-20 03:24:59 +00:00
nobu
85cb4ee236
* parse.y (parser_yylex): simplified with IS_ARG and IS_END.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-20 03:09:57 +00:00
nobu
04247ab5b4
* parse.y (parser_yylex): reduced duplicated conditions.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-19 10:18:56 +00:00
nobu
f25e99c55f
* parse.y (IS_END, IS_SPCARG): macros for simplification.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-18 13:16:30 +00:00
nobu
9f8b036123
* parse.y (string_content): cond_stack and cmdarg_stack are VALUE.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-18 13:13:23 +00:00
nobu
e70a308c75
* parse.y (parser_yylex): seems like a symbol-literal when spaces
...
are unbalanced. [ruby-core:29578]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-18 03:48:54 +00:00
nobu
cfab29b7db
* parse.y (string_content): preserve cond_stack and cmdarg_stack.
...
[ruby-core:29579]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-18 03:32:06 +00:00
mame
fd9c3fef0b
* parse.y (string_content, etc): counts of CMDARG_PUSH and POP were
...
inconsistent. [ruby-core:22637]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-16 12:57:28 +00:00
nobu
83b8f94f4e
* parse.y (rb_intern3): get rid of type-punning cast.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-17 19:41:00 +00:00
mame
4f78e7fff4
* parse.y (rb_intern3): prohibit Symbol with an invalid encoding.
...
[ruby-core:24621]
* test/ruby/test_m17n_comb.rb: modify a test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-16 16:26:04 +00:00
mame
6b438bee04
* parse.y (top_compstmt, top_stmts, top_stmt): prohibit BEGIN {} in
...
non-toplevel scope. [ruby-core:21657]
* test/ruby/test_beginendblock.rb (test_begininclass): add a test for
above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-18 16:43:29 +00:00
nobu
770b05dd9b
* parse.y (dyna_pop_gen): pop dvars. [ruby-dev:39861]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-09 16:12:57 +00:00
nobu
9ad065375f
* parse.y (k_def): adjust the location of method definition to the
...
line of def. [Bug #2427 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-04 07:50:15 +00:00
nobu
8f6cdd7927
* parse.y (dyna_push_gen, dyna_pop_gen): no needs to save both of
...
args and vars. [ruby-core:26961]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-01 03:01:15 +00:00
nobu
79446bfb70
* parse.y (dyna_push_gen): use rb_node_newnode() for ripper.
...
[ruby-core:26961]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-30 21:51:08 +00:00
nobu
9b02e165d3
* parse.y (dyna_push_gen, dyna_pop_gen): adjust local vtable level
...
for the case of syntax errors in method name or argument inside
do block. [ruby-core:26961]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-30 21:16:31 +00:00
nobu
b19b496248
* parse.y (parser_yylex): suppress an extra error message after
...
numeric literal without digits. based on a patch from ujihisa .
in [ruby-dev:39811]. [ruby-dev:39798]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-30 02:00:14 +00:00
nobu
746eb4a45b
* parse.y (BEGIN): now local_push are local_pop are necessary in
...
ripper.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-04 22:47:33 +00:00
kazu
ab77f00b04
* parse.y (ripper_filename): add Ripper#filename. [ruby-dev:37856] * test/ripper/test_filter.rb: add more tests.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-26 23:11:59 +00:00
nobu
6221d16ffb
* parse.y (arg_prepend): removed. a patch from Mikhail T. in
...
[ruby-core:26217].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-22 08:29:53 +00:00