summaryrefslogtreecommitdiff
path: root/test/ruby/test_variable.rb
AgeCommit message (Collapse)Author
2016-01-14variable.c: matched backrefs onlynobu
* variable.c (rb_f_global_variables): add matched back references only, as well as defiend? operator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-14variable.c: $1..$9 in global_variablesnobu
* variable.c (rb_f_global_variables): add $1..$9 only if $~ is set. fix the condition removed at r14014. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53530 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-11vm_eval.c: skip internal namesnobu
* vm_eval.c (local_var_list_add): skip internal local variable name by its type but not if it has a name. internal local variable names are just unique per frame, not globally. [ruby-core:71437] [Bug #11674] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-03variable.c: remove generic ivar support for special constantsnormal
Special constants are all frozen since [Feature #8923] and cannot support ivars. Remove some unused code we had for supporting them. * variable.c (special_generic_ivar): remove flag (givar_i, rb_mark_generic_ivar_tbl): remove functions (rb_free_generic_ivar, rb_ivar_lookup, rb_ivar_delete, generic_ivar_set, rb_ivar_set, rb_ivar_defined, rb_copy_generic_ivar, rb_ivar_foreach, rb_ivar_count, rb_obj_remove_instance_variable): adjust for lack of ivar support in special constants * test/ruby/test_variable.rb: test ivars for special consts * internal.h: remove rb_mark_generic_ivar_tbl decl * gc.c (gc_mark_roots): remove rb_mark_generic_ivar_tbl call git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-22test_variable.rb: suppress warningsnobu
* test/ruby/test_variable.rb (ruler4): suppress warning. (test_global_variable_poped, test_constant_poped): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13* test/lib/envutil.rb: Moved from test/ruby/.akr
* 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
2014-07-01test_proc.rb: test_local_variables_in_other_contextnobu
* test/ruby/test_proc.rb (test_local_variables_in_other_context): move from test_variable.rb, this is a test for the method of Binding, not of Kernel. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-07vm_eval.c: exclude hidden variablesnobu
* vm_eval.c (rb_f_local_variables): exclude variables hidden by shadowing. [ruby-core:60501] [Bug #9486] * vm.c (collect_local_variables_in_iseq): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-06parse.y: no duplicated namesnobu
* parse.y (new_bv_gen): no duplicated names, if already added in shadowing_lvar(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-06parse.y: remove duplicated namesnobu
* parse.y (local_tbl_gen): remove local variables duplicated with arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-24test_variable.rb: fix testnobu
* test/ruby/test_variable.rb (test_binding_local_variables): adjust local variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-24proc.c: Binding#local_variablesnobu
* proc.c (bind_local_variables): allowing binding to list its local variables. patch by Jack Danger Canty <jackdanger AT squareup.com> at [ruby-core:56543]. [Feature #8773] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-24* insns.def (defined): fix to checking class variable.ko1
A patch by Magnus Holm <judofyr@gmail.com>. Thanks! * test/ruby/test_variable.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-22* test/ruby/test_regexp.rb, test/ruby/test_symbol.rb,mame
test/ruby/test_variable.rb: add some tests (for coverage of compile.c). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-21* test/ruby/test_bignum.rb, test/ruby/test_class.rb,mame
test/ruby/test_defined.rb, test/ruby/test_hash.rb, test/ruby/test_primitive.rb, test/ruby/test_variable.rb: add some tests (for coverage). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06* {ext,lib,test}/**/*.rb: removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-14* test/ruby/test_variable.rb (TestVariable#test_variable): addkazu
a test of [ruby-dev:36698]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-24* test: assert_raises has been deprecated since a long time ago.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-15* test/ruby/envutil.rb (Test::Unit::Assertions#assert_in_out_err): newmame
method. * test/ruby/test_argf.rb: use assert_in_out_err instead of EnvUtil.rubyexec. * test/ruby/test_module.rb: ditto. * test/ruby/test_require.rb: ditto. * test/ruby/test_objectspace.rb: ditto. * test/ruby/test_object.rb: ditto. * test/ruby/test_string.rb: ditto. * test/ruby/test_method.rb: ditto. * test/ruby/test_variable.rb: ditto. * test/ruby/test_io.rb: ditto. * test/ruby/test_rubyoptions.rb: ditto. * test/ruby/test_exception.rb: ditto. * test/ruby/test_class.rb: ditto. * test/ruby/test_thread.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-14* test/ruby/test_variable.rb (TestVariable#test_global_variable_0): add test ↵kazu
of $0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-14* test/ruby/test_object.rb: new tests to achieve over 90% testmame
coverage of object.c, eval.c and eval_method.c. * test/ruby/test_module.rb: ditto. * test/ruby/test_trace.rb: ditto. * test/ruby/test_integer.rb: ditto. * test/ruby/test_float.rb: ditto. * test/ruby/test_method.rb: ditto. * test/ruby/test_variable.rb: ditto. * test/ruby/test_eval.rb: ditto. * test/ruby/test_exception.rb: ditto. * test/ruby/test_class.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-12* vm.c (collect_local_variables_in_env): remove unnecessary checkmame
which causes: x=1;proc{local_variables}.call #=> [] * test/ruby/test_variable.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-09add a test for [ruby-dev:34008].akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-03* variable.c (rb_cvar_set): check whether class variable ismatz
defined in superclasses. root classes have higher priority. removes lower class variable entry from IV_TBL (if it's defined in classes, not modules). * variable.c (rb_cvar_get): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-19* variable.c (rb_cvar_set): class variables become private to thematz
particular class/module. [Ruby2] * variable.c (rb_cvar_get): ditto. * io.c (rb_io_sync): need not to check writable. [ruby-core:02674] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-18 * test/*: should not depend on $KCODE.nahi
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-06* test/ruby/test_*.rb: assert_same, assert_match, and so on.nahi
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-05* lib/optparse.rb (OptionParser#order, #permute, #parse): allow annobu
array as argument. * test/ruby/test_*.rb: moved invariants to left side in assert_equal, and use assert_nil, assert_raises and so on. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-05* test/ruby/test_*.rb: replace 'assert(a == b)' with assert_equal(a, b)'nahi
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-04* test/ruby: tests for ruby itself.nahi
* test/ruby/test_*.rb: split sample/test.rb into 28 test/unit testcases. some tests could not be translates... search '!!' mark to see it. * test/csv/test_csv.rb: should require 'csv', not '../lib/csv'. test runner should set load path correctly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e