diff options
author | Yukihiro Matsumoto <[email protected]> | 1994-12-08 14:17:29 +0900 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2019-08-17 22:09:30 +0900 |
commit | 00e36aa09f54925c2f9c30524b48f4f54a9adb23 (patch) | |
tree | 57bf15576109b53406796c66b29d5e11d9fd99c0 /range.c | |
parent | 4dfd93c72a9a221c5575c5888483f2fb55c82117 (diff) |
version 0.60v0_60
https://cache.ruby-lang.org/pub/ruby/1.0/ruby-0.60.tar.gz
Thu Dec 8 14:17:29 1994 Yukihiro Matsumoto (matz@ix-02)
* 0.60 released - alpha test baseline.
Diffstat (limited to 'range.c')
-rw-r--r-- | range.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -3,7 +3,7 @@ range.c - $Author: matz $ - $Date: 1994/10/14 06:19:39 $ + $Date: 1994/12/06 09:30:12 $ created at: Thu Aug 19 17:46:47 JST 1993 Copyright (C) 1994 Yukihiro Matsumoto @@ -17,8 +17,8 @@ VALUE C_Range; static ID next, eq; -VALUE -range_new(class, start, end) +static VALUE +Srng_new(class, start, end) VALUE class, start, end; { VALUE obj; @@ -35,6 +35,13 @@ range_new(class, start, end) return obj; } +VALUE +range_new(start, end) + VALUE start, end; +{ + return Srng_new(C_Range, start, end); +} + static VALUE Frng_match(rng, obj) VALUE rng, obj; @@ -142,6 +149,7 @@ Init_Range() { C_Range = rb_define_class("Range", C_Object); rb_include_module(C_Range, M_Enumerable); + rb_define_single_method(C_Range, "new", Srng_new, 2); rb_define_method(C_Range, "=~", Frng_match, 1); rb_define_method(C_Range, "each", Frng_each, 0); rb_define_method(C_Range, "start", Frng_start, 0); |