Commit Graph

10 Commits

Author SHA1 Message Date
nobu 33b8591248 * eval.c (proc_set_safe_level, proc_invoke, rb_mod_define_method): not
set $SAFE for methods defined from Proc.  [ruby-dev:23697]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-19 04:27:08 +00:00
nobu 82572952ec * eval.c (rb_yield_0, proc_invoke, proc_arity): allow passing a block
to a Proc.  [ruby-dev:23533]

* parse.y (block_par, block_var): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-25 02:54:22 +00:00
matz c223709c3b * eval.c (proc_eq): avoid false positive by using scope and
dyna_vars.  no longer use frame.uniq.

* eval.c (proc_arity): arity is now defined as number of
  parameters that would not be ignored. i.e. Proc.new{}.arity
  returns zero.  update test suites too.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-18 10:09:43 +00:00
nahi 994dfc0ae6 * test/*: should not depend on $KCODE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-18 13:08:08 +00:00
akira 9ab9489da4 * test/ruby/test_proc.rb (TestProc::test_eq): added a
test.  [ruby-dev:22599]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-06 09:55:43 +00:00
akira 4d94e3ec48 * test/ruby/test_proc.rb (TestProc::test_eq): added tests for
Proc#==.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-06 09:27:53 +00:00
nobu a017b0cc8a * test/ruby/test_proc.rb (test_arity): added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-27 19:45:17 +00:00
nobu 44785befea * lib/optparse.rb (OptionParser#order, #permute, #parse): allow an
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 15:15:43 +00:00
nahi 65264eadbd * test/ruby/test_*.rb: replace 'assert(a == b)' with assert_equal(a, b)'
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-05 11:28:27 +00:00
nahi aaf5d9c03c * test/ruby: tests for ruby itself.
* 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
2003-09-04 16:18:59 +00:00