るりまサーチ

最速Rubyリファレンスマニュアル検索!
858件ヒット [1-100件を表示] (0.085秒)

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

モジュール

検索結果

<< 1 2 3 ... > >>

OptionParser#ver -> String (18114.0)

program_name、version と release から生成したバージョンを表す文字列を返します。

...program_name、version と release から生成したバージョンを表す文字列を返します。

//emlist[例][ruby]{
require "optparse"

OptionParser.new do |opts|
opts.banner = "Usage: example.rb [options]"
opts.program_name = "Optparse Example"
opts.version = [0, 1]
opts.release...
...= "2019-05-01"

opts.on_tail("--version", "Show version") do
puts opts.ver # => "Optparse Example 0.1 (2019-05-01)"
exit
end

opts.parse!(ARGV)
end
//}...

Gem::Specification#rubygems_version=(version) (12301.0)

この Gem パッケージを作成した RubyGems のバージョンをセットします。 この属性は Gem パッケージが作成された時に自動的にセットされます。

...この Gem パッケージを作成した RubyGems のバージョンをセットします。
この属性は Gem パッケージが作成された時に自動的にセットされます。

@param version RubyGems のバージョンを指定します。...

Gem::Specification#required_ruby_version -> Gem::Requirement (12218.0)

この Gem パッケージを動作させるのに必要な Ruby のバージョンを返します。

...この Gem パッケージを動作させるのに必要な Ruby のバージョンを返します。...

Gem::Specification#required_ruby_version=(requirement) (12218.0)

この Gem パッケージを動作させるのに必要な Ruby のバージョンをセットします。

...この Gem パッケージを動作させるのに必要な Ruby のバージョンをセットします。

@param requirement Gem::Requirement.create が受け付ける形式のオブジェクトを指定します。

@see Gem::Requirement...

Gem::Specification#required_rubygems_version -> Gem::Requirement (12201.0)

この Gem パッケージを動作させるのに必要な RubyGems のバージョンを返します。

...この Gem パッケージを動作させるのに必要な RubyGems のバージョンを返します。...

絞り込み条件を変える

Gem::Specification#required_rubygems_version=(requirement) (12201.0)

この Gem パッケージを動作させるのに必要な RubyGems のバージョンをセットします。

...この Gem パッケージを動作させるのに必要な RubyGems のバージョンをセットします。

@param requirement Gem::Requirement.create が受け付ける形式のオブジェクトを指定します。

@see Gem::Requirement...

Gem::Specification#rubygems_version -> String (12201.0)

この Gem パッケージを作成した RubyGems のバージョンを返します。

...この Gem パッケージを作成した RubyGems のバージョンを返します。...

Encoding::Converter#convert(source_string) -> String (9107.0)

与えられた文字列を変換して、変換できた結果を返します。 引数の末尾の文字がバイト列の途中で終わっている場合、そのバイト列は変換器内に取り置かれます。 変換を終了させるには Encoding::Converter#finish を呼びます。

...onverter#finish を呼びます。

Encoding::Converter を用いると、文字列の一部または全部を渡して変換を行うことができます。よって、不正なバイトを意識せずにストリームから読み出した文字列を変換したいときには Encoding::Converte...
...r が適します。

なお、Encoding::Converter#convert では、これらの例外を捕獲しても、例外を起こしたところから変換を再開することはできません。不正なバイトや変換先で未定義な文字をエスケープしたい場合やさらに細かい指...
...定を行いたい場合は、Encoding::Converter#primitive_convert を用います。

@param source_string 変換する文字列の一部または全部です。
@return 変換結果である文字列の一部または全部です。
@raise Encoding::InvalidByteSequenceError 変換元のエンコ...

Encoding::Converter#primitive_convert(source_buffer, destination_buffer) -> Symbol (9107.0)

エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。

...搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字...
...=> true # stop conversion after output before input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AFTER_OUTPUT

戻り値は以下のうちのどれかです。

* :invalid_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_convert(src, dst)
p [ret, src, dst, ec.primitive_errinfo]
case ret
when :invalid_byte_seq...
<< 1 2 3 ... > >>