aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_symbol.rb
Commit message (Collapse)AuthorAgeFilesLines
* Passed block symbol to procnobu2016-06-281-0/+29
| | | | | | | | * proc.c (passed_block): convert passed block symbol to proc. based on the patch by Daisuke Sato in [ruby-dev:49695]. [Bug #12531] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_insnhelper.c: check symbol proc to thrownobu2016-06-061-0/+9
| | | | | | | | * vm_insnhelper.c (vm_throw_start): check if the iseq is symbol proc, class definition should not be a symbol proc. [ruby-core:75856] [Bug #12462] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c: fail symbol proc bindingnobu2016-03-161-0/+9
| | | | | | | * proc.c (proc_binding): proc from symbol can not make a binding. [ruby-core:74100] [Bug #12137] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby: suppress parser warningsnobu2016-02-191-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: Symbol#matchnobu2016-02-181-0/+24
| | | | | | | * string.c (sym_match_m): delegate to String#match but not String#=~. [ruby-core:72864] [Bug #11991] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* symbol.c: more informative error messagenobu2016-01-251-1/+1
| | | | | | | | * symbol.c (sym_check_asciionly): more informative error message with the encoding name and the inspected content. [ruby-core:73398] [Feature #12016] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c: fix infinite loopnobu2015-12-191-0/+12
| | | | | | | * proc.c (rb_proc_get_iseq): proc made from symbol does not have iseq. fix infinite loop. [ruby-core:72381] [Bug #11845] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (rb_block_arity): should not call GetProcPtr() for symbols.shugo2015-12-171-0/+7
| | | | | | [ruby-core:72205] [Bug #11830] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add frozen_string_literal: false for all filesnaruse2015-12-161-0/+1
| | | | | | 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
* symbol.c: not freeze the receivernobu2015-11-201-0/+8
| | | | | | | * symbol.c (rb_str_intern): should not freeze the receiver itself unexpectedly. [ruby-core:71611] [Bug #11721] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_symbol.rb (test_symbol_fstr_leak): add a warm-upodaira2015-10-161-2/+2
| | | | | | | code and check RSS to avoid false positive on AIX and false negative on Mac OS X. [Bug #10686] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c: void envnobu2015-10-151-0/+1
| | | | | | * proc.c (rb_sym_to_proc): make void env. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c: proc without envnobu2015-10-151-0/+8
| | | | | | | * proc.c (rb_sym_to_proc): move from string.c and create a Proc with no environments. [ruby-core:71088] [Bug #11594] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_args.c: wrap symbol ifuncnobu2015-10-061-0/+7
| | | | | | | * vm_args.c (args_setup_block_parameter): wrap a symbol in ifunc by a proc as a block parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c: set ep properlynobu2015-10-051-0/+11
| | | | | | | * proc.c (proc_new): link ep to calling block. [ruby-core:70980] [Bug #11566] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_symbol.rb: relaxnobu2015-10-041-1/+1
| | | | | | | * test/ruby/test_symbol.rb (test_to_proc): relax timeout of r51991 too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_symbol.rb: reduce iterationnobu2015-10-031-1/+1
| | | | | | | * test/ruby/test_symbol.rb (test_to_proc): reduce iteration count more. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_symbol.rb: reduce iterationnobu2015-10-021-1/+1
| | | | | | | * test/ruby/test_symbol.rb (test_to_proc): reduce iteration count. actually it reproduced in 2 times. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_symbol.rb: relaxnobu2015-10-011-1/+1
| | | | | | | * test/ruby/test_symbol.rb (test_to_proc): relax the timeout. [ruby-core:70961] [Bug #11560] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c: fix symbol proc marknobu2015-10-011-0/+5
| | | | | | | * proc.c (proc_mark): block.ep of Proc from Symbol is now NULL. [ruby-core:70961] [Bug #11560] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_args.c: GC guardnobu2015-10-011-0/+5
| | | | | | | * vm_args.c (vm_caller_setup_arg_block): prevent newly created ifunc object from GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_parse.rb: move assertionsnobu2015-05-221-0/+13
| | | | | | | | | | | * test/ruby/test_module.rb (test_remove_class_variable): move an assertion for Module#remove_class_variable from test_parse.rb. * test/ruby/test_symbol.rb (test_intern, test_all_symbols): move assertions for Symbol#intern and Symbol.all_symbols from test_parse.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_eval.c: allow symbols to instance_eval/execnobu2015-04-231-0/+29
| | | | | | | | * vm_eval.c (rb_obj_instance_eval, rb_obj_instance_exec): allow symbols to just instance_eval/exec, execept for definition of singletons. [ruby-core:68961] [Bug #11086] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_symbol.rb: fix syntax error.ko12015-04-081-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c: compare symbols by identitiesnobu2015-04-081-0/+19
| | | | | | | * hash.c (rb_any_hash): Symbols are compared by the identities always. [ruby-core:68767] [Bug #11035] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_symbol.rb: avoid a false positive in AIXodaira2015-03-021-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_inadvertent_creation.rb: move testsnobu2015-02-051-65/+0
| | | | | | | * test/-ext-/symbol/test_inadvertent_creation.rb: move symbol leak tests, for implementation details, from test/ruby/test_symbol.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c: Revert r49500 (6ae6a8c7bc86e97)marcandre2015-02-041-2/+2
| | | | | | Creates a regression in test_drb. Above my rubyfu. [#10828] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_eval.c: Fix symbol leak with non optimized +send+ and method_missing ↵marcandre2015-02-041-0/+29
| | | | | | [#10828] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c: Fix symbol leak with +send+ and method_missing [#10828]marcandre2015-02-041-0/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c: Fix one type of symbol leak with +send+marcandre2015-02-041-0/+20
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_symbol.rb (TestSymbol#test_symbol_fstr_leak): get rid of ausa2015-01-081-1/+1
| | | | | | | false positive on mswin CI. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* symbol.c: fix memory leak from global fstr hashnormal2015-01-011-0/+8
| | | | | | | | * symbol.c (rb_gc_free_dsymbol): delete from global fstr hash * test/ruby/test_symbol.rb (test_symbol_fstr_leak): test for bug [ruby-core:67268] [Bug #10686] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* symbol.c: fix dynamic attrset IDnobu2014-09-191-0/+8
| | | | | | | | * symbol.c (rb_str_dynamic_intern): check if the stem ID of attrset ID is already registered as a static ID. [ruby-dev:48559] [Bug #10259] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (sym_find): remove Symbol.find because we have Symbol GC now.naruse2014-09-111-35/+0
| | | | | | | | | | https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20140904Japan If you still want this, request again on Redmine. [Feature #7854] https://bugs.ruby-lang.org/issues/7854 * ext/-test-/symbol/init.c (sym_find): moved from string.c for tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: turn dynamically interned Symbol into an IDnobu2014-05-021-6/+8
| | | | | | | | * parse.y (rb_id_attrset): turn dynamically interned Symbol into an ID, since rb_str_dynamic_intern returns a Symbol but not an ID. [ruby-core:62226] [Bug #9787] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: pin down dynamic symbol onlynobu2014-04-301-0/+18
| | | | | | | | | | * parse.y (rb_id_attrset): pin down dynamic symbol only. it is possibe that attrset ID can be registered as a static symbol after the corresponding attrget ID has been registered as a dynamic, and then the latter may be collected. [ruby-core:62226] [Bug #9787] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_symbol.rb (TestSymbol#test_symbol_gc_1): fix typo.ktsj2014-04-291-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (symbols_i): like r45492, call rb_gc_resurrect().ktsj2014-04-291-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add test for r45492, r45693, r45698naruse2014-04-241-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (dsym_node_gen): like r45492, call rb_gc_resurrect().naruse2014-04-231-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (sym_find): Add Symbol.find(str), which returns whether givennaruse2014-02-251-0/+15
| | | | | | string is defined as symbol or not. [Feature #7854] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: make Symbol objects frozen.ko12013-09-191-0/+8
| | | | | | | | | | | [Feature #8906] I want to freeze this good day, too. * test/ruby/test_eval.rb: catch up this change. * test/ruby/test_symbol.rb: add a test to check frozen symbols. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_symbol.rb: fix testnobu2013-06-181-4/+2
| | | | | | | * test/ruby/test_symbol.rb (test_block_persist_between_calls): needs receiver object. [Bug #8531] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h, vm_eval.c (rb_funcall_with_block):ktsj2013-06-171-1/+0
| | | | | | | | | | | | | | | | new function to invoke a method with a block passed as an argument. * string.c (sym_call): use the above function to avoid a block sharing. [ruby-dev:47438] [Bug #8531] * vm_insnhelper.c (vm_yield_with_cfunc): don't set block in the frame. * test/ruby/test_symbol.rb (TestSymbol#test_block_given_to_proc): run related tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* skip new tests until fixednobu2013-06-171-0/+2
| | | | | | | * test/ruby/test_proc.rb, test/ruby/test_symbol.rb: skip new tests until fixed, for the time being. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_symbol.rb: tests for [Bug #8531]nobu2013-06-171-1/+29
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: disallow $-nobu2013-04-241-5/+4
| | | | | | | | | * parse.y (parser_yylex): disallow $- without following identifier character. [ruby-talk:406969] * parse.y (is_special_global_name): mere $- is not a valid global variable name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_fixnum.rb (TestFixnum#test_singleton_method): new test.usa2012-08-231-0/+4
| | | | | | | | | | | * test/ruby/test_bignum.rb (TestBignum#test_singleton_method): ditto. * test/ruby/test_float.rb (TestFloat#test_singleton_method): ditto. * test/ruby/test_symbol.rb (TestSymbol#test_singleton_method): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (sym_check_asciionly): check ascii compatibility beforenobu2012-03-151-0/+7
| | | | | | | | | 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