summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-06 15:31:26 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-06 15:31:26 +0000
commitaa92750f27e519c225d9bb50e59ed063857e0c04 (patch)
treeb52c2b9114e9af08bd0805ef2ff52988fe2976bf /sample
parent2cefbe9fb2297147c034086ff3b1b2dd9a9f5545 (diff)
* process.c (proc_setgroups): [ruby-dev:25081]
* re.c (rb_reg_eqq): document fix. [ruby-talk:122541] * io.c (io_fread): take VALUE argument. * ext/socket/socket.c (sock_connect): use rb_str_new4(). [ruby-dev:25052] * eval.c (rb_yield_0): [ruby-dev:25051] * io.c (io_write): remove rb_str_locktmp(). [ruby-dev:25050] * io.c (io_fwrite): takes VALUE string as an argument. [ruby-dev:25050] * ext/socket/socket.c (sock_connect): remove rb_str_locktmp(). [ruby-dev:25050] * ext/socket/socket.c (udp_connect): [ruby-dev:25045] * ext/socket/socket.c (udp_bind): ditto. * ext/socket/socket.c (udp_send): ditto. * ext/socket/socket.c (bsock_send): ditto. * ext/socket/socket.c (s_recvfrom): ditto. * hash.c (rb_hash_hash): should provide "hash" method where "eql?" is redefined. [ruby-talk:122482] * ext/socket/socket.c (bsock_setsockopt): [ruby-dev:25039] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rw-r--r--sample/test.rb31
1 files changed, 31 insertions, 0 deletions
diff --git a/sample/test.rb b/sample/test.rb
index aed9e51b6e..37afe6e7b8 100644
--- a/sample/test.rb
+++ b/sample/test.rb
@@ -1365,6 +1365,37 @@ end
ITER_TEST4.new.foo(44){55}
+class ITER_TEST5
+ def tt(aa)
+ aa
+ end
+
+ def uu(a)
+ class << self
+ define_method(:tt) do |sym|
+ super(sym)
+ end
+ end
+ end
+
+ def xx(*x)
+ x.size
+ end
+end
+
+a = ITER_TEST5.new
+a.uu(12)
+test_ok(a.tt(1) == 1)
+
+class ITER_TEST6 < ITER_TEST5
+ def xx(*a)
+ a << 12
+ super
+ end
+end
+
+test_ok(ITER_TEST6.new.xx([24]) == 2)
+
test_check "float"
test_ok(2.6.floor == 2)
test_ok((-2.6).floor == -3)