[#19261] lstripped here-document (Re: comments and continuing strings on the next line) — nobu.nakada@...
なかだです。
29 messages
2003/01/01
[#19360] Re: lstripped here-document (Re: comments and continuing strings on the next line)
— "K.Kosako" <kosako@...>
2003/01/15
nobu.nakada@nifty.ne.jpさんの
[#19361] Re: lstripped here-document (Re: comments and continuing strings on the next line)
— "NAKAMURA, Hiroshi" <nakahiro@...>
2003/01/15
なひです。
[#19364] Re: lstripped here-document (Re: comments and continuing strings on the next line)
— nobu.nakada@...
2003/01/17
なかだです。
[#19366] Re: lstripped here-document (Re: comments and continuing strings on the next line)
— "NAKAMURA, Hiroshi" <nakahiro@...>
2003/01/17
なひです。
[#19387] standard ruby lib coding convension (was Re: lstripped here-document)
— "NAKAMURA, Hiroshi" <nakahiro@...>
2003/01/20
なひです。
[#19395] Re: standard ruby lib coding convension (was Re: lstripped here-document)
— "NAKAMURA, Hiroshi" <nakahiro@...>
2003/01/20
camelCaseなひです。
[#19398] Re: standard ruby lib coding convension (was Re: lstripped here-document)
— matz@... (Yukihiro Matsumoto)
2003/01/20
まつもと ゆきひろです
[#19287] Re: Class.inherited — matz@... (Yukihiro Matsumoto)
まつもと ゆきひろです
4 messages
2003/01/02
[#19299] [BUG] errno == 0 — Kazuhiro Yoshida <moriq@...>
もりきゅうです。win32だけかもしれません。
22 messages
2003/01/04
[#19301] Re: [BUG] errno == 0
— "U.Nakamura" <usa@...>
2003/01/04
こんにちは、なかむら(う)です。
[#19302] Re: [BUG] errno == 0
— "U.Nakamura" <usa@...>
2003/01/04
こんにちは、なかむら(う)です。
[#19303] Re: [BUG] errno == 0
— "U.Nakamura" <usa@...>
2003/01/04
こんにちは、なかむら(う)です。
[#19304] Re: [BUG] errno == 0
— "U.Nakamura" <usa@...>
2003/01/04
こんにちは、なかむら(う)です。
[#19306] Re: [BUG] errno == 0
— nobu.nakada@...
2003/01/05
なかだです。
[#19307] Re: [BUG] errno == 0
— "U.Nakamura" <usa@...>
2003/01/05
こんにちは、なかむら(う)です。
[#19308] Re: [BUG] errno == 0
— nobu.nakada@...
2003/01/05
なかだです。
[#19324] Re: [BUG] errno == 0
— "U.Nakamura" <usa@...>
2003/01/09
こんにちは、なかむら(う)です。
[#19325] Re: [BUG] errno == 0
— nobu.nakada@...
2003/01/09
なかだです。
[#19327] Re: [BUG] errno == 0
— "U.Nakamura" <usa@...>
2003/01/09
こんにちは、なかむら(う)です。
[#19333] Re: [BUG] errno == 0
— "U.Nakamura" <usa@...>
2003/01/09
こんにちは、なかむら(う)です。
[#19336] Re: [BUG] errno == 0
— nobu.nakada@...
2003/01/09
なかだです。
[#19338] Re: [BUG] errno == 0
— "U.Nakamura" <usa@...>
2003/01/09
こんにちは、なかむら(う)です。
[#19309] Re: [ruby-cvs] ruby, ruby/ext: * ext/extmk.rb (extmake): set $0 temporarily while loading — WATANABE Hirofumi <eban@...>
わたなべです。
6 messages
2003/01/05
[#19310] Re: [ruby-cvs] ruby, ruby/ext: * ext/extmk.rb (extmake): set $0 temporarily while loading
— nobu.nakada@...
2003/01/05
なかだです。
[#19317] [patch] cast for st_*. — "U.Nakamura" <usa@...>
こんにちは、なかむら(う)です。
6 messages
2003/01/09
[#19328] [Ruby/DL] 'S', 's' — WATANABE Hirofumi <eban@...>
わたなべです。
5 messages
2003/01/09
[#19329] [Ruby/DL] Bignum to ... — WATANABE Hirofumi <eban@...>
わたなべです。
6 messages
2003/01/09
[#19332] Re: [Ruby/DL] Bignum to ...
— Takaaki Tateishi <ttate@...>
2003/01/09
At Thu, 9 Jan 2003 16:30:59 +0900,
[#19370] shebang line of bin/* — "U.Nakamura" <usa@...>
こんにちは、なかむら(う)です。
7 messages
2003/01/17
[#19371] dbm.so + Berkeley DB[234] — akira yamada / やまだあきら <akira@...>
5 messages
2003/01/17
[#19405] Re: cannot find -lruby-static (PR#384) — WATANABE Hirofumi <eban@...>
わたなべです。
9 messages
2003/01/21
[#19407] Re: cannot find -lruby-static (PR#384)
— nobu.nakada@...
2003/01/21
なかだです。
[#19408] Re: cannot find -lruby-static (PR#384)
— nobu.nakada@...
2003/01/21
なかだです。
[#19410] [] 内での \001 のマッチ — WATANABE Tetsuya <tetsu@...>
渡辺哲也です。
10 messages
2003/01/22
[#19411] Re: [] 内での \001 のマッチ
— matz@... (Yukihiro Matsumoto)
2003/01/22
まつもと ゆきひろです
[#19423] Numeric#quo — matz@... (Yukihiro Matsumoto)
まつもと ゆきひろです
6 messages
2003/01/23
[#19430] HAVE_* macros — "Akinori MUSHA" <knu@...>
拡張ライブラリで 1.6/1.8 に両対応する際、以下のようなマクロが
10 messages
2003/01/24
[#19431] Re: HAVE_* macros
— matz@... (Yukihiro Matsumoto)
2003/01/24
まつもと ゆきひろです
[#19433] Re: HAVE_* macros
— "Akinori MUSHA" <knu@...>
2003/01/24
At Fri, 24 Jan 2003 22:08:48 +0900,
[#19437] recursive dryrun (Re: [ruby-cvs] ruby, ruby/ext, ruby/win32, ruby/bcc32: * instruby.rb, ext/extmk.rb, Makefile.in, win32/Makefile.sub,) — nobu.nakada@...
なかだです。
6 messages
2003/01/25
[#19441] Integer#gcd — masaki <GEC01122@...>
11 messages
2003/01/26
[#20244] Re: Integer#gcd
— matz@... (Yukihiro Matsumoto)
2003/05/20
まつもと ゆきひろです
[#20246] Re: Integer#gcd
— Shin-ichiro HARA <sinara@...>
2003/05/20
原です。
[ruby-dev:19264] Re: ruby-1.8.0 / yield(nil)とyield()のちがい
From:
matz@... (Yukihiro Matsumoto)
Date:
2003-01-01 01:06:07 UTC
List:
ruby-dev #19264
まつもと ゆきひろです
In message "[ruby-dev:19219] Re: ruby-1.8.0 / yield(nil)とyield()のちがい"
on 02/12/28, Yukihiro Matsumoto <matz@ruby-lang.org> writes:
|おとといから悩んでるんですが、異様に難しいです。が、そのうち
|になんとかします。
なんとかなったみたいです。以下のtest suiteが動作します。もう
じきコミットします。
# 次は定数問題[ruby-talk:59972]だ。
def test_ok(a, b)
if a != b
print "failed at ", caller(0)[1], "<a:", a.inspect, "> != <b:", b.inspect, ">\n"
end
end
a = nil; test_ok(a, nil)
a = 1; test_ok(a, 1)
a = []; test_ok(a, [])
a = [1]; test_ok(a, [1])
a = [nil]; test_ok(a, [nil])
a = [[]]; test_ok(a, [[]])
a = [1,2]; test_ok(a, [1,2])
a = [*[]]; test_ok(a, [])
a = [*[1]]; test_ok(a, [1])
a = [*[1,2]]; test_ok(a, [1,2])
a = *nil; test_ok(a, nil)
a = *1; test_ok(a, 1)
a = *[]; test_ok(a, nil)
a = *[1]; test_ok(a, 1)
a = *[nil]; test_ok(a, nil)
a = *[[]]; test_ok(a, [])
a = *[1,2]; test_ok(a, [1,2])
a = *[*[]]; test_ok(a, nil)
a = *[*[1]]; test_ok(a, 1)
a = *[*[1,2]]; test_ok(a, [1,2])
*a = nil; test_ok(a, [nil])
*a = 1; test_ok(a, [1])
*a = []; test_ok(a, [])
*a = [1]; test_ok(a, [1])
*a = [nil]; test_ok(a, [nil])
*a = [[]]; test_ok(a, [[]])
*a = [1,2]; test_ok(a, [1,2])
*a = [*[]]; test_ok(a, [])
*a = [*[1]]; test_ok(a, [1])
*a = [*[1,2]]; test_ok(a, [1,2])
*a = *nil; test_ok(a, [nil])
*a = *1; test_ok(a, [1])
*a = *[]; test_ok(a, [])
*a = *[1]; test_ok(a, [1])
*a = *[nil]; test_ok(a, [nil])
*a = *[[]]; test_ok(a, [])
*a = *[1,2]; test_ok(a, [1,2])
*a = *[*[]]; test_ok(a, [])
*a = *[*[1]]; test_ok(a, [1])
*a = *[*[1,2]]; test_ok(a, [1,2])
a,b,*c = nil; test_ok([a,b,c], [nil,nil,[]])
a,b,*c = 1; test_ok([a,b,c], [1,nil,[]])
a,b,*c = []; test_ok([a,b,c], [nil,nil,[]])
a,b,*c = [1]; test_ok([a,b,c], [1,nil,[]])
a,b,*c = [nil]; test_ok([a,b,c], [nil,nil,[]])
a,b,*c = [[]]; test_ok([a,b,c], [[],nil,[]])
a,b,*c = [1,2]; test_ok([a,b,c], [1,2,[]])
a,b,*c = [*[]]; test_ok([a,b,c], [nil,nil,[]])
a,b,*c = [*[1]]; test_ok([a,b,c], [1,nil,[]])
a,b,*c = [*[1,2]]; test_ok([a,b,c], [1,2,[]])
a,b,*c = *nil; test_ok([a,b,c], [nil,nil,[]])
a,b,*c = *1; test_ok([a,b,c], [1,nil,[]])
a,b,*c = *[]; test_ok([a,b,c], [nil,nil,[]])
a,b,*c = *[1]; test_ok([a,b,c], [1,nil,[]])
a,b,*c = *[nil]; test_ok([a,b,c], [nil,nil,[]])
a,b,*c = *[[]]; test_ok([a,b,c], [nil,nil,[]])
a,b,*c = *[1,2]; test_ok([a,b,c], [1,2,[]])
a,b,*c = *[*[]]; test_ok([a,b,c], [nil,nil,[]])
a,b,*c = *[*[1]]; test_ok([a,b,c], [1,nil,[]])
a,b,*c = *[*[1,2]]; test_ok([a,b,c], [1,2,[]])
def f; yield; end; f {|a| test_ok(a, nil)}
def f; yield nil; end; f {|a| test_ok(a, nil)}
def f; yield 1; end; f {|a| test_ok(a, 1)}
def f; yield []; end; f {|a| test_ok(a, [])}
def f; yield [1]; end; f {|a| test_ok(a, [1])}
def f; yield [nil]; end; f {|a| test_ok(a, [nil])}
def f; yield [[]]; end; f {|a| test_ok(a, [[]])}
def f; yield [*[]]; end; f {|a| test_ok(a, [])}
def f; yield [*[1]]; end; f {|a| test_ok(a, [1])}
def f; yield [*[1,2]]; end; f {|a| test_ok(a, [1,2])}
def f; yield *nil; end; f {|a| test_ok(a, nil)}
def f; yield *1; end; f {|a| test_ok(a, 1)}
def f; yield *[]; end; f {|a| test_ok(a, nil)}
def f; yield *[1]; end; f {|a| test_ok(a, 1)}
def f; yield *[nil]; end; f {|a| test_ok(a, nil)}
def f; yield *[[]]; end; f {|a| test_ok(a, [])}
def f; yield *[*[]]; end; f {|a| test_ok(a, nil)}
def f; yield *[*[1]]; end; f {|a| test_ok(a, 1)}
def f; yield *[*[1,2]]; end; f {|a| test_ok(a, [1,2])}
def f; yield; end; f {|*a| test_ok(a, [])}
def f; yield nil; end; f {|*a| test_ok(a, [nil])}
def f; yield 1; end; f {|*a| test_ok(a, [1])}
def f; yield []; end; f {|*a| test_ok(a, [])}
def f; yield [1]; end; f {|*a| test_ok(a, [1])}
def f; yield [nil]; end; f {|*a| test_ok(a, [nil])}
def f; yield [[]]; end; f {|*a| test_ok(a, [[]])}
def f; yield [*[]]; end; f {|*a| test_ok(a, [])}
def f; yield [*[1]]; end; f {|*a| test_ok(a, [1])}
def f; yield [*[1,2]]; end; f {|*a| test_ok(a, [1,2])}
def f; yield *nil; end; f {|*a| test_ok(a, [nil])}
def f; yield *1; end; f {|*a| test_ok(a, [1])}
def f; yield *[]; end; f {|*a| test_ok(a, [])}
def f; yield *[1]; end; f {|*a| test_ok(a, [1])}
def f; yield *[nil]; end; f {|*a| test_ok(a, [nil])}
def f; yield *[[]]; end; f {|*a| test_ok(a, [])}
def f; yield *[*[]]; end; f {|*a| test_ok(a, [])}
def f; yield *[*[1]]; end; f {|*a| test_ok(a, [1])}
def f; yield *[*[1,2]]; end; f {|*a| test_ok(a, [1,2])}
def f; yield; end; f {|a,b,*c| test_ok([a,b,c], [nil,nil,[]])}
def f; yield nil; end; f {|a,b,*c| test_ok([a,b,c], [nil,nil,[]])}
def f; yield 1; end; f {|a,b,*c| test_ok([a,b,c], [1,nil,[]])}
def f; yield []; end; f {|a,b,*c| test_ok([a,b,c], [nil,nil,[]])}
def f; yield [1]; end; f {|a,b,*c| test_ok([a,b,c], [1,nil,[]])}
def f; yield [nil]; end; f {|a,b,*c| test_ok([a,b,c], [nil,nil,[]])}
def f; yield [[]]; end; f {|a,b,*c| test_ok([a,b,c], [[],nil,[]])}
def f; yield [*[]]; end; f {|a,b,*c| test_ok([a,b,c], [nil,nil,[]])}
def f; yield [*[1]]; end; f {|a,b,*c| test_ok([a,b,c], [1,nil,[]])}
def f; yield [*[1,2]]; end; f {|a,b,*c| test_ok([a,b,c], [1,2,[]])}
def f; yield *nil; end; f {|a,b,*c| test_ok([a,b,c], [nil,nil,[]])}
def f; yield *1; end; f {|a,b,*c| test_ok([a,b,c], [1,nil,[]])}
def f; yield *[]; end; f {|a,b,*c| test_ok([a,b,c], [nil,nil,[]])}
def f; yield *[1]; end; f {|a,b,*c| test_ok([a,b,c], [1,nil,[]])}
def f; yield *[nil]; end; f {|a,b,*c| test_ok([a,b,c], [nil,nil,[]])}
def f; yield *[[]]; end; f {|a,b,*c| test_ok([a,b,c], [nil,nil,[]])}
def f; yield *[*[]]; end; f {|a,b,*c| test_ok([a,b,c], [nil,nil,[]])}
def f; yield *[*[1]]; end; f {|a,b,*c| test_ok([a,b,c], [1,nil,[]])}
def f; yield *[*[1,2]]; end; f {|a,b,*c| test_ok([a,b,c], [1,2,[]])}
class IterTest
def initialize(e); @body = e; end
def each0(&block); @body.each(&block); end
def each1(&block); @body.each {|*x| block.call(*x)} end
def each2(&block); @body.each {|*x| block.call(x) } end
def each3(&block); @body.each {|x| block.call(*x) } end
def each4(&block); @body.each {|x| block.call(x) } end
def each5; @body.each {|*x| yield(*x)} end
def each6; @body.each {|*x| yield(x) } end
def each7; @body.each {|x| yield(*x) } end
def each8; @body.each {|x| yield(x) } end
def f(a)
test_ok(a, [1])
end
end
IterTest.new(nil).method(:f).to_proc.call([1])
IterTest.new([0]).each0 {|x| test_ok(x, 0)}
IterTest.new([1]).each1 {|x| test_ok(x, 1)}
IterTest.new([2]).each2 {|x| test_ok(x, [2])}
IterTest.new([3]).each3 {|x| test_ok(x, 3)}
IterTest.new([4]).each4 {|x| test_ok(x, 4)}
IterTest.new([5]).each5 {|x| test_ok(x, 5)}
IterTest.new([6]).each6 {|x| test_ok(x, [6])}
IterTest.new([7]).each7 {|x| test_ok(x, 7)}
IterTest.new([8]).each8 {|x| test_ok(x, 8)}
IterTest.new([[0]]).each0 {|x| test_ok(x, [0])}
IterTest.new([[1]]).each1 {|x| test_ok(x, 1)}
IterTest.new([[2]]).each2 {|x| test_ok(x, [2])}
IterTest.new([[3]]).each3 {|x| test_ok(x, 3)}
IterTest.new([[4]]).each4 {|x| test_ok(x, [4])}
IterTest.new([[5]]).each5 {|x| test_ok(x, 5)}
IterTest.new([[6]]).each6 {|x| test_ok(x, [6])}
IterTest.new([[7]]).each7 {|x| test_ok(x, 7)}
IterTest.new([[8]]).each8 {|x| test_ok(x, [8])}
IterTest.new([[0,0]]).each0 {|x| test_ok(x, [0,0])}
IterTest.new([[8,8]]).each8 {|x| test_ok(x, [8,8])}