aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_defined.rb
Commit message (Collapse)AuthorAgeFilesLines
* 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
* * vm_insnhelper.c (vm_defined): check respond_to_missing?ko12015-06-021-0/+15
| | | | | | | | | at defined?(func()). * test/ruby/test_defined.rb: add a test for this fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (vm_defined): skip respond_to_missing? whenko12015-06-021-0/+25
| | | | | | | | | | a method is available. [Bug #11211] * test/ruby/test_defined.rb: add a test for this fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/lib/envutil.rb: Moved from test/ruby/.akr2014-11-131-1/+0
| | | | | | | | | | | | | | * 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/ruby: get rid of warnings.usa2014-03-041-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_defined.rb (TestDefined#test_super_toplevel):nobu2013-05-051-0/+5
| | | | | | additional test for r40584. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* insns.def: method entry from method framenobu2013-05-051-0/+16
| | | | | | | * insns.def (defined): get method entry from the method top level frame, not block frame. [ruby-core:54769] [Bug #8367] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: "nil" for defined? with empty expressionnobu2013-04-051-0/+7
| | | | | | | | * parse.y (new_defined): remove all extra parentheses, and return "nil" for defined? with empty expression. [ruby-core:54024] [Bug #8224] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * iseq.c (rb_iseq_defined_string): the index of defined_strings mustnaruse2012-09-241-0/+5
| | | | | | be the value of type - 1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use assert_predicate for unary operatornaruse2012-09-241-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Feature #7035nobu2012-09-241-0/+6
| | | | | | | | * compile.c (defined_expr), insns.def (defined): share single frozen strings. [EXPERIMENTAL] [ruby-core:47558][Feature #7035] * iseq.c (rb_iseq_defined_string): make expression strings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* insns.def: use klass in cfpnobu2012-08-061-0/+18
| | | | | | | | * insns.def (defined): now should use klass in the current control frame to search superclass, not me->klass. reported by naruse. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* defined: me in cfpnobu2012-07-111-0/+16
| | | | | | | | | * insns.def (defined): use method entry and id in cfp for proper superclass, since klass in iseq is shared by dynamically defined methods from the same block. [ruby-core:45831][Bug #6644] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (defined_expr): guard the whole expression.nobu2012-02-111-0/+12
| | | | | | [ruby-dev:45021][Bug#5786] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.h (COPY_CREF): should copyshugo2011-03-301-14/+19
| | | | | | | the NODE_FL_CREF_PUSHED_BY_EVAL flag to hide constants from methods defined by class_eval. [ruby-dev:43365] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_defined.rb (TestDefined#test_autoloaded_noload):nobu2011-03-241-0/+5
| | | | | | autoload file should no be loaded. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (vm_get_ev_const): should not autoload innobu2011-03-241-0/+11
| | | | | | defined? mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * variable.c (rb_const_defined_0): fix autoloading base.nobu2011-03-241-0/+18
| | | | | | [ruby-core:35509] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_defined.rb (TestDefined#test_defined): get rid ofnobu2011-03-241-3/+3
| | | | | | ruby-mode hilighting bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_bignum.rb, test/ruby/test_class.rb,mame2010-01-211-0/+7
| | | | | | | | 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
* * compile.c, insns.def: change return value of "defined?"ko12007-11-271-0/+29
| | | | | | | | | | | for $&, $1, ... . If such variables are defined, return "global-variable". * test/ruby/test_defined.rb: add tests. * bootstraptest/test_syntax.rb: fix a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (defined_expr): defined(method(x)) dumped core. amatz2007-11-231-2/+11
| | | | | | patch from Yusuke ENDOH <mame AT tsg.ne.jp>. [ruby-dev:32335] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/*: should not depend on $KCODE.nahi2004-02-181-2/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * variable.c (rb_const_defined_0): look up constants in Object asnobu2003-10-021-1/+4
| | | | | | | | | | well. [ruby-dev:21458] * test/ruby/test_defined.rb (TestDefined::test_defined): test for constants. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser#order, #permute, #parse): allow annobu2003-09-051-6/+6
| | | | | | | | | | 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
* * test/ruby/test_*.rb: replace 'assert(a == b)' with assert_equal(a, b)'nahi2003-09-051-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby: tests for ruby itself.nahi2003-09-041-0/+42
* 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