aboutsummaryrefslogtreecommitdiffstats
path: root/test/ripper
Commit message (Collapse)AuthorAgeFilesLines
* parse.y: freeze filenamenobu2014-03-241-0/+4
| | | | | | * parse.y (ripper_initialize): filename can not be modified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: remove "f" suffix [ruby-core:57966] [Feature #9042]nobu2013-11-101-9/+0
| | | | | | | | | | | | | | | | | | | | | | revert r42847 "test_string.rb: add test string encoding" revert r42846 "parse.y: freeze in advance to reduce objects" revert r42843 "parse.y: deduplicate frozen string literals" revert r42780 "test_string.rb: yet another test" revert r42779 "parse.y: valid suffix word only" revert r42778 "test_string.rb: remove duplicated code" revert r42775 "parse.y: force_encoding" This reverts commit 93ea04ecec7639ca8d0e58948e78461434782ecc. revert r42773 "Add frozen string literals" git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * NEWS: Add note about frozen string literalscharliesome2013-09-021-0/+9
| | | | | | | | | | | | | | | | | * compile.c (case_when_optimizable_literal): optimize NODE_LIT strings in when clauses of case statements * ext/ripper/eventids2.c: add tSTRING_SUFFIX * parse.y: add 'f' suffix on string literals for frozen strings * test/ripper/test_scanner_events.rb: add scanner tests * test/ruby/test_string.rb: add frozen string tests [Feature #8579] [ruby-core:55699] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* eventids2.c: new literalsnobu2013-08-021-0/+25
| | | | | | | | * ext/ripper/eventids2.c (ripper_init_eventids2): ripper support for new literals, tRATIONAL and tIMAGINARY. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: fail if invalid namenobu2013-05-082-6/+22
| | | | | | | * parse.y (parser_yylex): fail if $, @, @@ are not followed by a valid name character. [ruby-core:54846] [Bug #8375]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_scanner_events.rb: assert_locationnobu2013-05-081-22/+22
| | | | | | | * test/ripper/test_scanner_events.rb (TestRipper#assert_location): rename so skipped in backtraces. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use assert_separately to speed up on test-allnaruse2013-04-021-42/+20
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* scoped constant op-assignmentnobu2012-12-251-1/+4
| | | | | | | | | | * test/ripper/test_parser_events.rb (test_opassign): allow scoped constant op-assignment. [ruby-core:40154] [Bug #5449] * test/ripper/test_parser_events.rb (test_opassign_error): backref opassign is only error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* scoped constant op-assignmentnobu2012-12-241-4/+4
| | | | | | | * test/ripper/test_parser_events.rb (test_opassign_error): allow scoped constant op-assignment. [ruby-core:40154] [Bug #5449] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: flush string contentnobu2012-12-061-0/+7
| | | | | | | * parse.y (parser_here_document): flush string content between new line and :string_embexpr. [ruby-core:48703] [Bug #7255] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_scanner_events.rb: ruby-mode highlight by heredocnobu2012-12-061-39/+39
| | | | | | | * test/ripper/test_scanner_events.rb (TestRipper::ScannerEvents): get rid of make ruby-mode highlight confused by heredoc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (load_file_internal): set default source encoding asnaruse2012-11-061-1/+1
| | | | | | | | | UTF-8 instead of US-ASCII. [ruby-core:46021] [Feature #6679] * parse.y (parser_initialize): set default parser encoding as UTF-8 instead of US-ASCII. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert r37326 "remove string literal concatenation"nobu2012-10-251-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove string literal concatenationnobu2012-10-251-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Suppress warningsnaruse2012-09-051-3/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove trainling spaces.nobu2012-08-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: added symbols and qsymbols productions for %i and %Itenderlove2012-07-242-0/+46
| | | | | | | | | | | | | | | | support. %i{ .. } returns a list of symbols without interpolation, %I{ .. } returns a list of symbols with interpolation. Thanks to Josh Susser for inspiration of this feature. [Feature #4985] * ext/ripper/eventids2.c: added ripper events for %i and %I. * test/ripper/test_parser_events.rb: ripper tests * test/ripper/test_scanner_events.rb: ditto * test/ruby/test_array.rb: test for %i and %I behavior git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* suppress fragile warnings.akr2012-07-191-1/+20
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (assoc, parser_yylex): add syntax to splat keyword hash.nobu2012-04-281-0/+6
| | | | | | | | | | [ruby-core:44591][Feature #6353] * compile.c (compile_array_): generate keyword splat insns. * vm.c (m_core_hash_merge_kwd): merge keyword hash into intermediate hash. leftward argument is prior currently. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (string_content, parser_yylex): count brace nesting tonobu2012-04-091-3/+0
| | | | | | dispatch embexpr_end. [ruby-core:43775][Bug #6211] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h (struct rb_iseq_struct), compile.c (iseq_set_arguments, ↵mame2011-12-261-1/+1
| | | | | | | | | | | | | iseq_compile_each), vm_insnhelper.c (vm_callee_setup_arg_complex): implement keyword arguments. See [ruby-core:40290] The feature is promised to be included in 2.0, but the detail spec is still under discussion; this commit is a springboard for further discussion. Please try it and give us feedback. This commit includes fixes for some problems reported by Benoit Daloze <eregontp AT gmail.com> [ruby-core:40518] and Marc-Andre Lafortune <ruby-core-mailing-list AT marc-andre.ca> [ruby-core:41772]. * iseq.c (iseq_free, prepare_iseq_build): bookkeeping. * test/ruby/test_keyword.rb: add tests for keyword arguments. * test/ripper/dummyparser.rb (class DummyParser): temporal fix for ripper test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_magic_comment): should pass the proper value.nobu2011-12-121-2/+2
| | | | | | | [ruby-dev:44984][Bug #5753] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a comment.akr2011-10-281-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* A test for r33542.naruse2011-10-281-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_data_type): inherit the core type in ripper sonobu2011-09-171-0/+49
| | | | | | 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
* * parse.y (var_ref): distinguish vcall from local variablenobu2011-07-101-14/+18
| | | | | | | 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 (arg): rescue_mod is in inverse order from othernobu2011-07-061-2/+6
| | | | | | | 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 (parser_here_document): should dispatch heredoc_endnobu2011-07-051-0/+8
| | | | | | 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
* * parse.y (parser_parse_string): flush delayed token. based on anobu2011-06-131-2/+15
| | | | | | | | patch by Masaya Tarui in [ruby-dev:43762]. Bug #4544 * parse.y (yylex): revert r24557. delayed token at the end of string should be flushed already by the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/pty/pty.c (chfunc): suppress a warning.nobu2011-02-061-0/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (words, qwords): dispatch array events. based on anobu2011-02-062-11/+29
| | | | | | | patch from Michael Edgar. [Bug #4365]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (mlhs_basic): include mlhs_post for ripper. a patchnobu2011-02-051-0/+13
| | | | | | from Michael Edgar at [ruby-core:35078]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (stmt): missing ripper rule. i.e., `a::B ||= c 1'.nobu2010-12-262-10/+21
| | | | | | | http://twitter.com/#!/wannabe53/status/18797576396472321 http://twitter.com/#!/wannabe53/status/18798416150663168 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ripper/test_parser_events.rb (TestRipper#test_block_variables):kosaki2010-12-141-1/+1
| | | | | | | | | | Limit address space 100MB instead 100KB. Quite frankly, This margin is too narrow to contain ruby. [ruby-dev:42763] [Bug#4159] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Clean warnings: unused variables.naruse2010-06-231-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (ripper_get_value): escape Qundef.nobu2010-04-261-5/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ripper/test_parser_events.rb: more regexp literal tests.nobu2010-04-221-0/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ripper/test_parser_events.rb (test_unterminated_regexp):nobu2010-04-221-1/+9
| | | | | | | separate test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ripper/test_parser_events.rb (test_local_variables): for r27431.nobu2010-04-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ripper/test_parser_events.rb (test_operator_ambiguous): new test.nobu2010-04-221-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* supress warnings.akr2010-01-251-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ripper/test_parser_events.rb: more tests.nobu2009-12-085-101/+560
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (ripper_filename): add Ripper#filename. [ruby-dev:37856] * ↵kazu2009-10-261-6/+35
| | | | | | 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
* * test/ripper/test_*.rb: fixed indent.nobu2009-10-204-31/+26
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (method_call): dispatch symbols. a patch from Andy Keep innobu2009-10-201-4/+18
| | | | | | | [ruby-core:26169]. [ruby-core:26165] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (mlhs_basic): fixed handling splat in middle of mlhs. anobu2009-10-201-20/+40
| | | | | | | patch from Andy Keep in [ruby-core:26163] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_here_document): dispatch delayed heredocnobu2009-10-203-6/+20
| | | | | | | contents. based on a patch from Andy Keep in [ruby-core:24855]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (bv_decls, bvar): fix for block variables.nobu2009-10-031-0/+10
| | | | | | | [ruby-dev:39423] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ripper/test_scanner_events.rb: workaround for ruby-mode.el confusion.nobu2009-10-031-7/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ripper/dummyparser.rb: suppress redefinition warnings.nobu2009-10-031-7/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e