nobu
0331e42be3
parse.y: freeze filename
...
* 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
2014-03-24 13:19:57 +00:00
nobu
90b9996523
parse.y: remove "f" suffix [ruby-core:57966] [Feature #9042 ]
...
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 93ea04ecec
.
revert r42773 "Add frozen string literals"
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-10 06:13:02 +00:00
charliesome
a056098cb7
* NEWS: Add note about frozen string literals
...
* 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
2013-09-02 07:11:41 +00:00
nobu
856a9afb98
eventids2.c: new literals
...
* 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
2013-08-02 14:13:20 +00:00
nobu
85280f4b55
parse.y: fail if invalid name
...
* 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
2013-05-08 04:07:22 +00:00
nobu
4dfd373905
test_scanner_events.rb: assert_location
...
* 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
2013-05-08 04:07:21 +00:00
naruse
1ee9f3759d
Use assert_separately to speed up on test-all
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-02 06:28:17 +00:00
nobu
94b57518b1
scoped constant op-assignment
...
* 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
2012-12-25 00:30:47 +00:00
nobu
73fb923cb3
scoped constant op-assignment
...
* 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
2012-12-24 23:50:49 +00:00
nobu
bd0c636211
parse.y: flush string content
...
* 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
2012-12-06 08:29:16 +00:00
nobu
68a44cd169
test_scanner_events.rb: ruby-mode highlight by heredoc
...
* 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
2012-12-06 08:25:50 +00:00
naruse
58ef0f06c6
* ruby.c (load_file_internal): set default source encoding as
...
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
2012-11-06 00:49:57 +00:00
nobu
e6c5b9f308
revert r37326 "remove string literal concatenation"
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-25 14:06:31 +00:00
nobu
db1f7079b6
remove string literal concatenation
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-25 10:07:22 +00:00
naruse
d4e2cb1564
Suppress warnings
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-05 06:23:13 +00:00
nobu
d059d718b5
remove trainling spaces.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-21 04:50:18 +00:00
tenderlove
91bd6e711d
* parse.y: added symbols and qsymbols productions for %i and %I
...
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
2012-07-24 18:10:35 +00:00
akr
ff331d1442
suppress fragile warnings.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-19 12:14:30 +00:00
nobu
3380974143
* parse.y (assoc, parser_yylex): add syntax to splat keyword hash.
...
[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
2012-04-28 21:12:05 +00:00
nobu
41c199130a
* parse.y (string_content, parser_yylex): count brace nesting to
...
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
2012-04-09 06:16:07 +00:00
mame
a0a2c144b8
* vm_core.h (struct rb_iseq_struct), compile.c (iseq_set_arguments, 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
2011-12-26 14:20:09 +00:00
nobu
0f9662f366
* parse.y (parser_magic_comment): should pass the proper value.
...
[ruby-dev:44984][Bug #5753 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-12 21:29:53 +00:00
akr
27295f104a
add a comment.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-28 13:25:05 +00:00
naruse
96031a6d4e
A test for r33542.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-28 03:11:06 +00:00
nobu
c4d77cb4ad
* parse.y (parser_data_type): inherit the core type in ripper so
...
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
2011-09-17 14:34:13 +00:00
nobu
577c03c713
* parse.y (var_ref): distinguish vcall from local variable
...
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
2011-07-10 13:38:17 +00:00
nobu
c1d84bfcdb
* parse.y (arg): rescue_mod is in inverse order from other
...
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
2011-07-06 19:31:33 +00:00
nobu
2ac460af94
* parse.y (parser_here_document): should dispatch heredoc_end
...
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
2011-07-05 06:28:07 +00:00
nobu
ce90fcdbbd
* parse.y (parser_parse_string): flush delayed token. based on a
...
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
2011-06-13 14:38:26 +00:00
nobu
9b68d667c7
* ext/pty/pty.c (chfunc): suppress a warning.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-06 05:56:14 +00:00
nobu
b1986003bd
* parse.y (words, qwords): dispatch array events. based on a
...
patch from Michael Edgar. [Bug #4365 ].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-06 03:18:44 +00:00
nobu
476ba90835
* parse.y (mlhs_basic): include mlhs_post for ripper. a patch
...
from Michael Edgar at [ruby-core:35078].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-05 12:47:16 +00:00
nobu
cc479b25ba
* parse.y (stmt): missing ripper rule. i.e., `a::B ||= c 1'.
...
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
2010-12-26 02:39:14 +00:00
kosaki
b2f69c4c1f
* test/ripper/test_parser_events.rb (TestRipper#test_block_variables):
...
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
2010-12-14 18:21:31 +00:00
naruse
0de2d84af8
Clean warnings: unused variables.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-23 05:32:46 +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
48f2a5fcc4
* test/ripper/test_parser_events.rb: more regexp literal tests.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-22 19:13:46 +00:00
nobu
2dc5fdec01
* test/ripper/test_parser_events.rb (test_unterminated_regexp):
...
separate test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-22 19:11:28 +00:00
nobu
04c651c0bd
* test/ripper/test_parser_events.rb (test_local_variables): for r27431.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-22 08:59:57 +00:00
nobu
87a371197e
* test/ripper/test_parser_events.rb (test_operator_ambiguous): new test.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-22 08:05:15 +00:00
akr
37679ee584
supress warnings.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-25 23:12:50 +00:00
nobu
1963713205
* test/ripper/test_parser_events.rb: more tests.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-08 01:01:04 +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
28d97e63d6
* test/ripper/test_*.rb: fixed indent.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-20 06:35:26 +00:00
nobu
e3e93bb53e
* parse.y (method_call): dispatch symbols. a patch from Andy Keep in
...
[ruby-core:26169]. [ruby-core:26165]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-20 06:28:51 +00:00
nobu
14f13abb85
* parse.y (mlhs_basic): fixed handling splat in middle of mlhs. a
...
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
2009-10-20 06:07:39 +00:00
nobu
b907ee320d
* parse.y (parser_here_document): dispatch delayed heredoc
...
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
2009-10-20 05:50:53 +00:00
nobu
72ad8595f2
* parse.y (bv_decls, bvar): fix for block variables.
...
[ruby-dev:39423]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-03 13:14:19 +00:00
nobu
7b26a97142
* test/ripper/test_scanner_events.rb: workaround for ruby-mode.el confusion.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-03 12:57:54 +00:00
nobu
2957020491
* test/ripper/dummyparser.rb: suppress redefinition warnings.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-03 12:25:32 +00:00