aboutsummaryrefslogtreecommitdiffstats
path: root/test/ripper
Commit message (Collapse)AuthorAgeFilesLines
* Fix Ripper.lex error in dedenting squiggly heredocnobu2016-02-021-0/+6
| | | | | | | | * ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): Fix Ripper.lex error in dedenting squiggly heredoc. heredoc tree is also an array of Elem in the outer tree. [Fix GH-1234] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert r53431 "temporally revert r53411 to debug"naruse2016-01-041-0/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* temporally revert r53411 to debugnaruse2016-01-041-12/+0
| | | | | | http://rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20151225T162507Z.diff.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: use nd_tagnobu2016-01-022-2/+13
| | | | | | | * parse.y (regexp): set_yylval_num sets u1, should use nd_tag instead of nd_state. [ruby-core:72638] [Bug #11932] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert r53409 "parse.y: yylval.num should be u3"naruse2016-01-021-11/+0
| | | | | | It introduces SEGV git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: yylval.num should be u3nobu2016-01-021-0/+11
| | | | | | | * parse.y (set_yylval_num): should be used as nd_state, set to u3. [ruby-core:72638] [Bug #11932] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add frozen_string_literal: false for all filesnaruse2015-12-166-1/+7
| | | | | | When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: indented hereocnobu2015-12-072-0/+48
| | | | | | * parse.y: add heredoc <<~ syntax. [Feature #9098] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: last content of heredocnobu2015-11-281-0/+5
| | | | | | | * parse.y (parser_here_document): store dispatched result of on_tstring_content at the last fragment of a here document. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_parser_events.rb: suppress a warningnobu2015-11-271-1/+1
| | | | | | | | * test/ripper/test_parser_events.rb (test_warn_cr_in_middle): remove unused variable to suppress assigned-but-unused-variable warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: ripper for warningsnobu2015-11-241-0/+6
| | | | | | | * parse.y (parser_yylex): deal with magic comment warnings also in ripper. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* change DOTQnobu2015-11-062-9/+9
| | | | | | | * defs/id.def (token_ops), parse.y (parser_yylex): change DOTQ from ".?" to "&.". [ruby-core:71363] [Feature #11537] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: fix op_assign typenobu2015-10-281-0/+10
| | | | | | | * parse.y (new_attr_op_assign): fix op_assign type, which is already an ID since r52284. [Feature #11537] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_parser_events.rb: event tokennobu2015-10-281-13/+26
| | | | | | | * test/ripper/test_parser_events.rb (test_opassign): test parsed event tokens too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: call_op2nobu2015-10-261-1/+16
| | | | | | | * parse.y (call_op2): separate from call_op and also allow "::", while dot_or_colon should not allow ".?". [Feature #11537] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* symbol.c: dotq in rippernobu2015-10-251-0/+2
| | | | | | * symbol.c (op_tbl): add DOTQ for ripper. [Feature #11537] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: fix ripper warningsnobu2015-10-141-0/+21
| | | | | | | | | * parse.y (parser_nextc): send a warning to ripper, not to STDERR always. * parse.y (rb_warn1, rb_warning1): move argument conversions to callers. PRIsVALUE is not valid in String#%. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: fix tokennobu2015-09-241-0/+29
| | | | | | | * parse.y (paren_args): fix separator token at `foo::bar()` in ripper. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: refine message for gvar w/o identitirsnobu2015-05-131-0/+3
| | | | | | | * parse.y (parse_gvar): separate message for gvar without non-space characters from message for invalid identitirs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: fix f_label resultnobu2015-01-041-3/+19
| | | | | | | * parse.y (f_label): return tLABEL value as it is. [ruby-core:67315] [Bug #10693] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: preserve tSTRING_CONTENT resultsnobu2014-12-011-0/+3
| | | | | | | * parse.y (ripper_flush_string_content): preserve the dispatched results at tSTRING_CONTENT. [ruby-dev:48714] [Bug #10437] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: enable encoding pragma in rippernobu2014-12-011-0/+3
| | | | | | | * parse.y (magic_comment_encoding): enable in ripper, since the encoding is necessary to parse non-default encoding scripts. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: fix a typonobu2014-11-301-0/+20
| | | | | | | * parse.y (regexp_contents): fix a typo. pointed out by wanabe. [ruby-dev:48741] [Bug #10543] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* dummyparser.rb: on_rescuenobu2014-11-222-2/+14
| | | | | | | | | | * test/ripper/dummyparser.rb (on_rescue): add to turn exception class list into NodeList, to test exception class list. * test/ripper/test_parser_events.rb (test_rescue_class): add missing test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ripper/test_files.rb: set filename.usa2014-11-201-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: regexp error in rippernobu2014-11-191-0/+3
| | | | | | | * parse.y (ripper_flush_string_content, parser_parse_string): preserve parsed string content. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/lib/envutil.rb: Moved from test/ruby/.akr2014-11-132-3/+1
| | | | | | | | | | | | | | * test/lib/find_executable.rb: Ditto. * test/lib/memory_status.rb: Ditto. * test/lib/test/unit.rb: require envutil. * test/: Don't require envutil in test files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_parser_events.rb: split test_binarynobu2014-10-271-9/+5
| | | | | | | * test/ripper/test_parser_events.rb (test_binary): split for each operators. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Ripper.sexp returns errornobu2014-10-261-0/+18
| | | | | | | * ext/ripper/lib/ripper/sexp.rb (Ripper.sexp, Ripper.sexp_raw): return nil on error. [ruby-dev:48678] [Bug #10405] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: fix fluent interface identifiernobu2014-10-241-0/+4
| | | | | | | | * parse.y (parser_yylex): dispatch newline and space at fluent interface, so that the following identifier does not include the space. [ruby-dev:48684] [Bug #10411] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: do not use disposed stringnobu2014-10-161-0/+4
| | | | | | | * parse.y (parser_here_document): do not append already appended and disposed code fragment. [ruby-dev:48647] [Bug #10392] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: separate ripper data typenobu2014-09-301-4/+11
| | | | | | | * parse.y (parser_data_type): separate ripper data type for from parser. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: quoted ID keynobu2014-09-202-0/+9
| | | | | | | * parse.y (assoc): allow quoted ID as a key of a hash literal. [ruby-core:34453] [Feature #4276] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ripper/test_scanner_events.rb: fill empty test methodsnobu2014-07-251-0/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: dynamic const assign_error in rippernobu2014-07-241-3/+22
| | | | | | | | * parse.y (mlhs_node): dynamic constant assignment in massign should cause assign_error, like as single assign and backref assignment in massign. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 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