From b2420d8ffa4d347a75efbbdc376f4ce65c0eb172 Mon Sep 17 00:00:00 2001 From: Yukihiro Matsumoto Date: Mon, 10 Apr 1995 18:36:06 +0900 Subject: version 0.73 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://cache.ruby-lang.org/pub/ruby/1.0/ruby-0.73.tar.gz Mon Apr 10 18:36:06 1995 Yukihiro Matsumoto (matz@ix-02) * version 0.73 Fri Apr 7 13:51:08 1995 Yukihiro Matsumoto (matz@ix-02) * cons.c->assoc.c: consの余計な機能は外してpairとしての機能だけを 残した.enumerableをincludeするのもやめた. * string.c(esub): 文字列置換イテレータ.perlのs///eの相当する. --- spec | 125 ++++++++++++++++++++++++++++++------------------------------------- 1 file changed, 56 insertions(+), 69 deletions(-) (limited to 'spec') diff --git a/spec b/spec index eaec5a37c4..7414f37333 100644 --- a/spec +++ b/spec @@ -287,7 +287,7 @@ Ruby {1=>2, 2=>4, 3=>6} ϢȤǤդΥ֥Ȥ򥭡(ź)ȤƻǤ롥Ruby -ϢHash(ϥåɽ)饹Υ󥹥󥹤Ǥ롥ܺ٤ϥ饹 +ϢHash(Ϣ)饹Υ󥹥󥹤Ǥ롥ܺ٤ϥ饹 Hashι򻲾Ȥ줿ϢϢ󼰤ϰʲηǤ롥 `{' `=>' .. `}' @@ -865,6 +865,13 @@ Ruby ޥɥ饤󤫤ϤEOFãƤ硤֤ + esub(pattern) + + ƥѿ`$_'λؤʸФִԤʤƥ졼ʸ + pattern˥ޥåʬʸ˥֥åɾ + η̤֤롥String饹esub᥽åɤβ򻲾Ȥ + ȡesub᥽åɤ`$_'ͤ򹹿롥 + eval(expr) exprȤͿ줿ʸrubyץȤƲᡤ¹Ԥ롥 @@ -1255,8 +1262,8 @@ Methods: assoc(key) - Ϣۥꥹ(CONSڥǤȤ)򸡺1Ǥkey - ("=="Ӥ)֤ + Ϣۥꥹ(assocڥǤȤ)򸡺1Ǥkey + ("=="Ӥ)֤ clear @@ -1376,6 +1383,31 @@ Single Methods: ǤȤ롥 +** Assoc(饹) + +ǡ(ڥ)ɽ륯饹̾`::'黻ҤѤƹԤʤ +롥 + +SuperClass: Object + +Methods: + + car + + CONSڥΥǡCAR֤ + + car=(val) + + CONSڥCARΥǡѹ롥 + + cdr + + CONSڥΥǡCDR֤ + + cdr=(val) + + CONSڥCDRΥǡѹ롥 + ** Bignum(饹) ̵¿ĹΥ饹黻η̤FixnumϰǤˤϼ @@ -1495,63 +1527,6 @@ Methods: selfminmaxϰˤ֤ -** Cons(饹) - -ǡ(ڥ)ɽ륯饹̾`::'黻ҤѤƹԤʤ -롥LispCONSڥƱͤListѤ뤳Ȥ⤢롥 -Cons饹Υ᥽å`[]',`[]=',`each'CONSڥʤꥹȤФ -ư褦߷פƤ롥 - -: - a=1::2::3 - a[0] # a[0] => 1 - a[2] = 5 # a => 1::5::3 - for i in a - print i - end # prints `153' - -SuperClass: Object - -Included Modules: Enumerable - -Methods: - - self [nth] - - CONSڥʤꥹȤnthܤǤ֤бǤ¸ - ߤʤnil֤ - - self [nth]= val - - CONSڥʤꥹȤnthܤǤѹ롥ꥹȤĹ - nthǻꤷĹûơбǤ¸ߤʤ - 㳰ȯ롥nthꥹȤĹˤϥꥹȤ - Ǥɲä롥 - - car - - CONSڥΥǡCAR֤ - - car=(val) - - CONSڥCARΥǡѹ롥 - - cdr - - CONSڥΥǡCDR֤ - - cdr=(val) - - CONSڥCDRΥǡѹ롥 - - copy - - CONSڥʤꥹȤʣ֤(shallow copy) - - each - - CONSڥʤꥹȤγǤͿ륤ƥ졼 - ** Dir(饹) ǥ쥯ȥǤ֤ǥ쥯ȥꥹȥ꡼ΤΥ饹 @@ -2235,11 +2210,11 @@ Methods: has_key(key) includes(key) - key¸ߤ֤ + keyϢ¸ߤ֤ has_value(value) - valueͤȤȤ¸ߤ֤ + valueͤȤȤϢ¸ߤ֤ indexes(ary) indexes(key-1, ..., key-n) @@ -2250,30 +2225,36 @@ Methods: keys - ¸ߤ륭Ƥޤ֤ + Ϣ¸ߤ륭Ƥޤ֤ length size - Ǥο֤ + ϢǤο֤ + + shift + + ϢǤļФ()key::valueʤڥ + ֤ to_a - key-valueڥǤȤ֤ + Ϣkey-valueڥǤȤ֤ values - ¸ߤƤޤ֤ + Ϣ¸ߤƤޤ֤ Single Methods: Hash[key, value..] - ܤΰkeyܤΰvalueȤ뼭롥 + ܤΰkeyܤΰvalueȤϢ + 롥 new - ()񥪥֥Ȥ֤ + ()Ϣ󥪥֥Ȥ֤ ** Integer(饹) @@ -2450,7 +2431,7 @@ Methods: self :: other - selfotherǤȤCONSڥ֤α黻ҤϱǤ + selfotherǤȤassocڥ֤α黻ҤϱǤ Τǡa::b::c (a::(b::c)) Ȳᤵ롥 is_nil @@ -2942,6 +2923,12 @@ Methods: ʸΤ줾ΥХȤˤĤƷ֤ƥ졼 + esub(pattern) + + ʸpattern˥ޥåʬִ륤ƥ졼ޥå + ʬʸȤƥ֥åɾ̤ʸ֤ + 롥sub/gsubΤ褦`&', `\1..\9'ִϹԤʤʤ + gsub(pattern, replace) ʸpattern˥ޥåʬreplace֤롥 -- cgit v1.2.3