種類
- インスタンスメソッド (126)
- クラス (18)
- ライブラリ (2)
クラス
-
Encoding
:: Converter (60) -
Psych
:: Visitors :: YAMLTree (24) - ThreadsWait (6)
-
Zlib
:: Inflate (12) -
Zlib
:: ZStream (24)
キーワード
- ErrNoFinishedThread (6)
- ThreadGroup (12)
- finish (12)
- finished? (30)
-
insert
_ output (12) -
minitest
/ unit (1) -
primitive
_ convert (48) -
stream
_ end? (12) -
test
/ unit (1)
検索結果
先頭5件
- Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize) -> Symbol - Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize , options) -> Symbol - ThreadGroup
- minitest
/ unit - test
/ unit
-
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize) -> Symbol (12.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...nvalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :finished
//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src = "abc\x81あいう\u{20bb7}\xe3"
dst = ''
begin
ret = ec.primitive_con......ert_output('\x{%X:%s}' % [c.ord, c.encoding])
redo
when :incomplete_input
ec.insert_output(ec.primitive_errinfo[3].dump[1..-2])
when :finished
end
break
end while nil
//}
不正なバイトや変換先で未定義なバイトをエスケープしつつ変換する例です。以上... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize , options) -> Symbol (12.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...nvalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :finished
//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src = "abc\x81あいう\u{20bb7}\xe3"
dst = ''
begin
ret = ec.primitive_con......ert_output('\x{%X:%s}' % [c.ord, c.encoding])
redo
when :incomplete_input
ec.insert_output(ec.primitive_errinfo[3].dump[1..-2])
when :finished
end
break
end while nil
//}
不正なバイトや変換先で未定義なバイトをエスケープしつつ変換する例です。以上... -
ThreadGroup (12.0)
-
スレッドグループを表すクラスです。グループに属する Thread をまとめて 操作することができます。
...るのを待つ
5.times {
Thread.new { sleep 1; puts "#{Thread.current} finished" }
}
(ThreadGroup::Default.list - [Thread.current]).each {|th| th.join}
puts "all threads finished"
対象の Thread が Thread を起こす可能性がある場合
(Thread.exclusive... -
minitest
/ unit (12.0) -
ユニットテストを行うためのライブラリです。
...行します。
デフォルトではすべてのテストが実行されます。
$ ruby test_foo.rb
Loaded suite test_foo
Started
F.
Finished in 0.000940 seconds.
1) Failure:
test_bar(TestFoo) [test_foo.rb:20]:
Expected "bar", not "foo".
2 tests, 2 assertions, 1 failures......トしたい場合は以下のようなオプションを与えます。
$ ruby test_foo.rb -n test_bar
Loaded suite test_foo
Started
F
Finished in 0.000820 seconds.
1) Failure:
test_bar(TestFoo) [test_foo.rb:20]:
Expected "bar", not "foo".
1 tests, 1 assertions, 1 failure... -
test
/ unit (12.0) -
ユニットテストを行うためのライブラリです。
...トではすべてのテストが実行されます。
$ ruby test_foo.rb
Loaded suite test_foo
Started
F.
Finished in 0.022223 seconds.
1) Failure:
test_bar(TC_Foo) [test_foo.rb:16]:
<"bar"> expected but was
<"foo">.......うなオプションを与えます。
$ ruby test_foo.rb --name test_bar
Loaded suite test_foo
Started
F
Finished in 0.019573 seconds.
1) Failure:
test_bar(TC_Foo) [test_foo.rb:16]:
<"bar"> expected but was
<"foo">.... -
Zlib
:: Inflate # finish -> String (6.0) -
展開ストリームを終了します。
...ストリーム内に残っていたデータ (つまり圧縮データの後についていた
ゴミデータ) を返します。
Zlib::ZStream#finished? が真でない時に finish を呼ぶと
例外が発生します。
展開ストリームは圧縮データ内に終了コードを発見し...