aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
Commit message (Collapse)AuthorAgeFilesLines
* * parse.y (sym_check_asciionly): check ascii compatibility beforenobu2012-03-151-18/+17
| | | | | | | | | scanning for code range. * parse.y (intern_str): set to us-ascii if ascii only. [ruby-dev:45363][Bug #6146] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix rippernobu2012-03-131-13/+16
| | | | | | * parse.y (new_args_gen, new_args_tail_gen): fix ripper. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_set_arguments): keyword rest arg without keyword args.nobu2012-03-131-630/+140
| | | | | | | | | | * node.c (dump_node): dump kw_rest_arg too. * parse.y (block_param, f_arg): more kwrest patterns. [ruby-core:42455][Bug #5989] * parse.y (new_args_gen): no extra kw_rest_arg if no keyword rest arg. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (block_param, f_args): add rules for the case argumentsnobu2012-03-131-0/+16
| | | | | | begin with kwrest. [ruby-core:42455][Bug #5989] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * node.h (NEW_YIELD), parse.y (new_yield_gen): array-values flagsnobu2012-03-121-13/+4
| | | | | | | has been already obsolete. patch by Thomas Enebo. [ruby-core:41929][Bug #5847] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_tokadd_string): escape simple regexp metanobu2012-03-061-1/+13
| | | | | | character termninators. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (block_call): rules for block_call after block_call.nobu2012-03-051-0/+24
| | | | | | | based on a patch by pasberth https://github.com/ruby/ruby/pull/102 [ruby-dev:45308][Bug #6115] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (block_command, block_call): simplified rules.nobu2012-03-051-22/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_tokadd_string): regexp engine doesn't neednobu2012-03-041-0/+4
| | | | | | terminators to be escaped. [ruby-core:40364][Bug #5484] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (opt_bv_decl): allow newline at the end. [ruby-dev:45292]matz2012-02-271-4/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_tokadd_string): insert a backslash only ifnobu2012-02-241-2/+1
| | | | | | | quoted by single quotes. [ruby-dev:45281] [Bug #6069] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_tokadd_string, parser_yylex): insert a backslashnobu2012-02-231-1/+5
| | | | | | if the next character is non-ascii. [ruby-dev:45278] [Bug #6069] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (debug_lines, coverage): set file path encoding for coveragemame2012-02-011-2/+2
| | | | | | result. [ruby-dev:44950] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_intern3): split to registration check and newnobu2012-01-221-14/+39
| | | | | | | | | registration. * parse.y (rb_intern_str): make interned string shared with the given string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_intern3, rb_intern_str): check the coderange first.nobu2012-01-221-22/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * node.h (rb_args_info): change pre_args_num and post_args_num asnobu2011-12-271-2/+2
| | | | | | | | int, to match with rb_iseq_t. * parse.y (new_args_gen): check overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * node.h, node.c, parse.y: implement a parser part for keyword arguments. ↵mame2011-12-261-72/+620
| | | | | | | | This is a preparation for keyword argument (see [ruby-core:40290]). * gc.c (gc_mark_children): bookkeeping. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * node.h, parse.y (new_args_gen), compile.c (iseq_set_arguments): use struct ↵mame2011-12-261-16/+15
| | | | | | | | rb_args_info instead of NODEs. This is a preparation for keyword argument (see [ruby-core:40290]). * node.c (dump_node), gc.c (gc_mark_children, obj_free): bookkeeping. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * node.h, parse.y (lambda, f_larglist): remove NEW_LAMBDA hack. This is a ↵mame2011-12-261-4/+3
| | | | | | preparation for keyword argument (see [ruby-core:40290]). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (primary): point method name line. [ruby-core:40936]nobu2011-12-131-20/+50
| | | | | | | [Bug #5614] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_magic_comment): should pass the proper value.nobu2011-12-121-0/+1
| | | | | | | [ruby-dev:44984][Bug #5753] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (stmt_or_begin): changed the error message for BEGIN notshugo2011-12-121-6/+28
| | | | | | at toplevel. [ruby-dev:44963] [Bug #5738] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (big_rshift), compile.c (validate_label,nobu2011-12-051-4/+2
| | | | | | | | | | | | | | iseq_build_from_ary_exception), cont.c (cont_capture), dir.c (dir_open_dir), gc.c (objspace_each_objects), io.c (pipe_open) (rb_io_advise), parse.y (parser_compile_string) (rb_parser_compile_file), proc.c (binding_free), process.c (rb_proc_exec_n, rb_seteuid_core, proc_setegid, rb_setegid_core) (p_uid_exchange, p_gid_exchange), regparse.c (strdup_with_null), signal.c (sig_dfl), vm.c (rb_iseq_eval, rb_iseq_eval_main), vm_insnhelper.c (vm_expandarray): suppress unused-but-set-variable warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (nodetype, nodeline): suppress warnings.nobu2011-11-291-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (nodetype, nodeline): static. these functions are forusa2011-11-281-2/+2
| | | | | | | debugging, and not intend to be public. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_nextc): set encoding for the buffer of ripper.naruse2011-10-281-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/ripper/eventids2.c (ripper_init_eventids2): separatenobu2011-10-181-9/+13
| | | | | | | | initializations of IDs and objects. * ext/ripper/tools/generate.rb (generate_eventids1): ditto. * parse.y (Init_ripper, InitVM_ripper): fix inversed roles. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * use RB_TYPE_P which is optimized for constant types, instead ofnobu2011-09-291-1/+1
| | | | | | comparison with TYPE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_data_type): inherit the core type in ripper sonobu2011-09-171-2/+16
| | | | | | that checks in core would work. [ruby-core:39591] [Bug #5331] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * README.EXT, README.EXT.ja (2.2.2), parse.y (rb_check_id): addnobu2011-09-121-0/+11
| | | | | | documents for rb_check_id(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (bv_decls): parse.y relies on $$ = $1 before actionmatz2011-09-091-1/+1
| | | | | | | routines. a patch from Michael Edgar. [Bug #5303] [ruby-core:39429] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_tokadd_string, parser_yylex): ignore a backslashnobu2011-09-021-0/+8
| | | | | | | | which prefixes an non-ascii character, which has no escape syntax. [ruby-core:39222] [Ruby 1.9 - Bug #5262] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_check_id): make the given name a symbol or a string.nobu2011-07-261-1/+3
| | | | | | based on the second patch by Jeremy Evans at [ruby-core:38447] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_enc_symname_type): :$a!, @a! and so on are notnaruse2011-07-231-0/+2
| | | | | | valid symbols, so they should be inspected with quotes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_check_id): take care of attrset ID creatednobu2011-07-231-3/+27
| | | | | | implicitly by local ID. [Bug #5084] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_check_id): conversion condition was inverse.nobu2011-07-231-1/+1
| | | | | | [Bug #5084] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (rb_mod_{const,cvar}_defined, rb_obj_ivar_defined):nobu2011-07-221-18/+119
| | | | | | | | | | | | avoid inadvertent symbol creation in reflection methods. based on a patch by Jeremy Evans at [ruby-core:38367]. [Feature #5072] * vm_method.c (rb_mod_method_defined) (rb_mod_{public,private,protected}_method_defined) (obj_respond_to): ditto. * parse.y (rb_check_id): new function returns already interned ID or 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_is_global_id, rb_is_attrset_id): add missingnobu2011-07-221-0/+12
| | | | | | predicates. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_enc_symname2_p): get rid of potential out-of-boundnobu2011-07-221-2/+2
| | | | | | | access. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (var_ref): distinguish vcall from local variablenobu2011-07-101-7/+63
| | | | | | | references. based on a patch by Michael Edgar michael.j.edgar AT dartmouth.edu. Bug #5002 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (reduce_nodes_gen): NODE_RETURN in rescue body must not bemame2011-07-101-0/+4
| | | | | | | reduced when there is an else clause. This caused bizarre behavior in [Bug #4473] [ruby-core:35629] [ruby-core:37884]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_enc_set_index, rb_enc_associate_index): shouldnobu2011-07-071-1/+2
| | | | | | | | check if frozen. * parse.y (rb_intern3), ruby.c (process_options, ruby_script): defer freezing after associating encodings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (arg): rescue_mod is in inverse order from othernobu2011-07-061-1/+1
| | | | | | | modifiers. patched by michael.j.edgar AT dartmouth.edu at [ruby-core:36248]. fixed #4716. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (opt_call_args): allow trailing comma after assocmatz2011-07-061-0/+8
| | | | | | argument e.g. 'foo(bar:1,)'. fixed #3456 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_here_document): should dispatch heredoc_endnobu2011-07-051-6/+17
| | | | | | scanner event on an empty here document. fixed Bug#4543. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * sytle fixes.nobu2011-06-301-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * math.c: Attach documentation for Math.drbrain2011-06-291-0/+12
| | | | | | | | | | | | | | | | | | | | * object.c: Document NIL, TRUE, FALSE. * io.c: Improve grammar in ARGF comment. Document STDIN/OUT/ERR. Document ARGF global constant. * lib/rake: Hide deprecated toplevel constants from RDoc (import from rake trunk). * lib/thwait.rb: Document ThWait. * lib/mathn.rb: Hide Math redefinition from RDoc * lib/sync.rb: Add a basic comment for Sync_m, Synchronizer_m, Sync, Synchronizer. * parse.y: Document SCRIPT_LINES__. * hash.c: Document ENV class and global constant. * vm.c: Document TOPLEVEL_BINDING. * version.c: Document RUBY_* constants. * ruby.c: Document DATA and ARGV. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_parser_end_seen_p): fix documentation about returnnaruse2011-06-261-2/+1
| | | | | | value. patched by Sho Hashimoto. [Bug #4511] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: comma at the end of line is no longer allowed.shyouhei2011-06-261-4/+12
| | | | | | | | A patch from Yukihiro Matsumoto <matz AT ruby-lang.org>. (fixed #3456). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * method.h, internal.h iseq.h: declare internal functions.akr2011-06-181-1/+0
| | | | | | | | | | | | | | | | | | * compile.c, eval.c, iseq.c, object.c, parse.y, proc.c, process.c, thread.c, vm.c, vm_eval.c, vm_insnhelper.c, vm_method.c: don't declare internal functions. Note that rb_method_entry_eq() is defined in vm_method.c but there was a declaration in proc.c with different const-ness. Now it is declared in method.h with same const-ness to the definition. * object.c (rb_mod_module_exec): don't declare functions declared in include/ruby/intern.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e