summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-10 16:48:02 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-10 16:48:02 +0000
commite366c36b6b4c32393e73cacb9a1b49905d28c195 (patch)
treecf4e7eab4adcf09aa81b01b6ddf5fee4c1f50da4 /ext
parentffddf9349fc0810ba4f796c487a4e7d4c6622b94 (diff)
* ext/thread/thread.c (Init_thread): Define missing aliases:
Queue#enq and SizedQueue#enq. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/thread/thread.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/thread/thread.c b/ext/thread/thread.c
index 1ca5ee6dca..cacd555877 100644
--- a/ext/thread/thread.c
+++ b/ext/thread/thread.c
@@ -1105,6 +1105,7 @@ Init_thread(void)
rb_define_method(rb_cQueue, "num_waiting", rb_queue_num_waiting, 0);
rb_define_method(rb_cQueue, "pop", rb_queue_pop, -1);
rb_define_method(rb_cQueue, "push", rb_queue_push, 1);
+ rb_alias(rb_cQueue, rb_intern("enq"), rb_intern("push"));
rb_alias(rb_cQueue, rb_intern("<<"), rb_intern("push"));
rb_alias(rb_cQueue, rb_intern("deq"), rb_intern("pop"));
rb_alias(rb_cQueue, rb_intern("shift"), rb_intern("pop"));
@@ -1117,6 +1118,7 @@ Init_thread(void)
rb_define_method(rb_cSizedQueue, "push", rb_queue_push, 1);
rb_define_method(rb_cSizedQueue, "max", rb_sized_queue_max, 0);
rb_define_method(rb_cSizedQueue, "max=", rb_sized_queue_max_set, 1);
+ rb_alias(rb_cSizedQueue, rb_intern("enq"), rb_intern("push"));
rb_alias(rb_cSizedQueue, rb_intern("<<"), rb_intern("push"));
rb_alias(rb_cSizedQueue, rb_intern("deq"), rb_intern("pop"));
rb_alias(rb_cSizedQueue, rb_intern("shift"), rb_intern("pop"));