るりまサーチ

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

別のキーワード

  1. openssl integer
  2. asn1 integer
  3. _builtin integer
  4. integer new
  5. integer chr

ライブラリ

クラス

キーワード

検索結果

<< 1 2 > >>

Integer#ord -> Integer (39226.0)

自身を返します。

...自身を返します。

//emlist[][ruby]{
10.ord #=> 10
# String#ord
?a.ord #=> 97
//}

@see String#ord...

Integer#chr -> String (21006.0)

self を文字コードとして見た時に、引数で与えたエンコーディング encoding に対応する文字を返します。

...ンコーディングを表すオブジェクト。Encoding::UTF_8、'shift_jis' など。
@return 一文字からなる文字列
@raise RangeError self を与えられたエンコーディングで正しく解釈できない場合に発生します。
@see String#ord Encoding.default_internal...

Integer#chr(encoding) -> String (21006.0)

self を文字コードとして見た時に、引数で与えたエンコーディング encoding に対応する文字を返します。

...ンコーディングを表すオブジェクト。Encoding::UTF_8、'shift_jis' など。
@return 一文字からなる文字列
@raise RangeError self を与えられたエンコーディングで正しく解釈できない場合に発生します。
@see String#ord Encoding.default_internal...

String#ord -> Integer (18214.0)

文字列の最初の文字の文字コードを整数で返します。

...の文字コードを整数で返します。

self が空文字列のときは例外を発生します。

@return 文字コードを表す整数
@raise ArgumentError self の長さが 0 のとき発生

//emlist[例][ruby]{
p "a".ord # => 97
//}

@see Integer#chr, String#chr...

GetoptLong#ordering -> Integer (6201.0)

現在の順序形式を返します。

現在の順序形式を返します。

絞り込み条件を変える

Numeric (82.0)

数値を表す抽象クラスです。Integer や Float などの数値クラス は Numeric のサブクラスとして実装されています。

...数値を表す抽象クラスです。Integer や Float などの数値クラス
は Numeric のサブクラスとして実装されています。

演算や比較を行うメソッド(+, -, *, /, <=>)は Numeric のサブクラスで定義されま
す。Numeric で定義されているメソッ...
...れのクラスを参照してください。


=> ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
Numeric Integer Fixnum Bignum Float Rational Complex
------------------------------------------------------------------------------...
...- o o o
odd? | - o o o - - -
ord
| - o - - - - -
phase | o - -...
...クラスを参照してください。


=> ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin15]
Numeric Integer Float Rational Complex
--------------------------------------------------------------------------------
% |...
...o
odd? | - o - - -
ord
| - o - - -
Numeric Integer Float Rational Complex
---------------------------------------------------...

ruby 1.9 feature (36.0)

ruby 1.9 feature ruby version 1.9.0 は開発版です。 以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。 1.9.1 以降は安定版です。 バグ修正がメインになります。

...」は 1byte のことです
: String#ord という、1文字の文字列に対し、その文字のコードを返すメソッドが追加されました
: string[integer] が 1文字の String を返すようになりました
: string.slice(integer) が 1文字の String を返すよう...
...プションの追加
((<ruby-dev:28417>))

=== 2006-02-15

: instance_eval

((<ruby-core:7365>))

=== 2006-02-03

: Integer#upto [compat]
: Integer#downto [compat]
: Integer#doitems [compat]

ブロックがなければ enumerator を返す

: Enumerable#group_by [new]
: Enumerable#first...
...ruby 1.8.2 (2004-07-17) [i586-linux]
false
# => ruby 1.9.0 (2004-07-17) [i586-linux]
-:1:in `system': No such file or directory - hogehoge (Errno::ENOENT)
from -:1

p system("/tmp")

# => ruby 1.8.2 (2004-07-17) [i586-linux]...

NEWS for Ruby 3.0.0 (30.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...言語仕様の変更

* Keyword arguments are now separated from positional arguments.
Code that resulted in deprecation warnings in Ruby 2.7 will now
result in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
subject to...
...autosplatting. This now matches the behavior of Procs
accepting a single rest argument and no keywords.
16166

//emlist[][ruby]{
pr = proc{|*a, **kw| [a, kw]}

pr.call([1])
# 2.7 => [[1], {}]
# 3.0 => [[[1]], {}]

pr.call([1, {a: 1}])
# 2.7 => [[1], {:a=>1}] # and deprecation warning
# 3.0...
...}.each(&->(k, v) { })` raises an ArgumentError due to lambda's arity check.
* When writing to STDOUT redirected to a closed pipe, no broken pipe error message will be shown now. 14413
* `TRUE`/`FALSE`/`NIL` constants are no longer defined.
* Integer#zero? overrides Numeric#zero? for optimizat...

String#chr -> String (24.0)

self の最初の文字だけを含む文字列を返します。

...by 1.9 で IO#getc の戻り値が Integer から String を返すように変更になりました。
Ruby 1.8 以前と1.9以降の互換性を保つために String#chr が存在します。

例:
# ruby 1.8 系では STDIN.getc が 116 を返すため Integer#chr が呼び出される
$ ech...
...o test | ruby -e "p STDIN.getc.chr" # => "t"
# ruby 1.9 系以降では STDIN.getc が "t" を返すため String#chr が呼び出される
$ echo test | ruby -e "p STDIN.getc.chr" # => "t"

@see String#ord, Integer#chr...

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

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

...ut => true # source buffer may be part of larger source
:after_output => true # stop conversion after output before input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AFTER_OUTPUT

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

* :invalid_byt...
...redo
when :undefined_conversion
c = ec.primitive_errinfo[3].dup.force_encoding(ec.primitive_errinfo[1])
ec.insert_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...

絞り込み条件を変える

<< 1 2 > >>