summaryrefslogtreecommitdiff
path: root/test/ruby/test_symbol.rb
AgeCommit message (Collapse)Author
2017-07-03Suppress warning: method redefined; discarding old ==naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-02Symbol#== should be able to be redefinedktsj
* vm.c (vm_init_redefined_flag): set redefinition flag for Symbol#==. The bug was introduced in r58895. * test/ruby/test_symbol.rb: test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-21test_string.rb,test_symbol.rb: add some testsstomar
* test/ruby/test_string.rb: add more test cases for String#casecmp. * test/ruby/test_symbol.rb: ditto for Symbol#{casecmp,casecmp?}. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-29test_symbol.rb: switch to assert_not_equalnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-28test/ruby/test_symbol.rb: new test for nondeterminismnormal
We need to ensure hashes for static symbols remain non-deterministic to avoid DoS attacks. This is currently the case since 2.4+, but was not for the 2.3 series. * test/ruby/test_symbol.rb (test_hash_nondeterministic): new test [ruby-core:80430] [Bug #13376] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-26vm_eval.c: Symbol#to_proc and instance_execnobu
* vm_eval.c (yield_under): should evaluate the proc on the first argument. [ruby-core:78839] [Bug #13074] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-26test/ruby/test_symbol.rb: use begin;end; hacknobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-18Increase timeoutnaruse
http://rubyci.s3.amazonaws.com/unstable10s/ruby-trunk/log/20161215T021909Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-12test for Symbol#match? [Feature #12898]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-06Fix typoskazu
Patch by: Koichi ITO <koic.ito@gmail.com> [Fix GH-1498] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-28implement String/Symbol#casecmp? including Unicode case foldingduerst
* string.c: Implement String#casecmp? and Symbol#casecmp? by using String#downcase :fold for Unicode case folding. This does not include options such as :turkic, because these currently cannot be combined with the :fold option. This implements feature #12786. * test/ruby/test_string.rb/test_symbol.rb: Tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-15test_refinement.rb: test_symbol_procnobu
* test/ruby/test_refinement.rb (test_symbol_proc): move from test_symbol.rb [Feature #9451] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-15vm_args.c: allow refinements in Symbol procnobu
* vm_args.c (refine_sym_proc_call): search and call method with refinements. * vm_args.c (vm_caller_setup_arg_block): enable refinements when enabled in the caller. [Feature #9451] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-28Passed block symbol to procnobu
* 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
2016-06-06vm_insnhelper.c: check symbol proc to thrownobu
* 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
2016-03-16proc.c: fail symbol proc bindingnobu
* 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
2016-02-19test/ruby: suppress parser warningsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-18string.c: Symbol#matchnobu
* 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
2016-01-25symbol.c: more informative error messagenobu
* 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
2015-12-19proc.c: fix infinite loopnobu
* 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
2015-12-17* proc.c (rb_block_arity): should not call GetProcPtr() for symbols.shugo
[ruby-core:72205] [Bug #11830] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16Add frozen_string_literal: false for all filesnaruse
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
2015-11-20symbol.c: not freeze the receivernobu
* 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
2015-10-16* test/ruby/test_symbol.rb (test_symbol_fstr_leak): add a warm-upodaira
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
2015-10-15proc.c: void envnobu
* 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
2015-10-15proc.c: proc without envnobu
* 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
2015-10-06vm_args.c: wrap symbol ifuncnobu
* 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
2015-10-05proc.c: set ep properlynobu
* 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
2015-10-04test_symbol.rb: relaxnobu
* 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
2015-10-03test_symbol.rb: reduce iterationnobu
* 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
2015-10-02test_symbol.rb: reduce iterationnobu
* 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
2015-10-01test_symbol.rb: relaxnobu
* 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
2015-10-01proc.c: fix symbol proc marknobu
* 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
2015-10-01vm_args.c: GC guardnobu
* 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
2015-05-22test_parse.rb: move assertionsnobu
* 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
2015-04-23vm_eval.c: allow symbols to instance_eval/execnobu
* 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
2015-04-08* test/ruby/test_symbol.rb: fix syntax error.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-08hash.c: compare symbols by identitiesnobu
* 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
2015-03-02* test/ruby/test_symbol.rb: avoid a false positive in AIXodaira
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-05test_inadvertent_creation.rb: move testsnobu
* 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
2015-02-04* vm_insnhelper.c: Revert r49500 (6ae6a8c7bc86e97)marcandre
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
2015-02-04* vm_eval.c: Fix symbol leak with non optimized +send+ and method_missing ↵marcandre
[#10828] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-04* vm_insnhelper.c: Fix symbol leak with +send+ and method_missing [#10828]marcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-04* vm_insnhelper.c: Fix one type of symbol leak with +send+marcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-08* test/ruby/test_symbol.rb (TestSymbol#test_symbol_fstr_leak): get rid of ausa
false positive on mswin CI. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-01symbol.c: fix memory leak from global fstr hashnormal
* 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
2014-09-19symbol.c: fix dynamic attrset IDnobu
* 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
2014-09-11* string.c (sym_find): remove Symbol.find because we have Symbol GC now.naruse
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
2014-05-02parse.y: turn dynamically interned Symbol into an IDnobu
* 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
2014-04-30parse.y: pin down dynamic symbol onlynobu
* 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