59件ヒット
[1-59件を表示]
(0.124秒)
種類
- インスタンスメソッド (22)
- 特異メソッド (22)
- クラス (11)
- 文書 (4)
ライブラリ
- ビルトイン (22)
-
irb
/ magic-file (22) -
rubygems
/ package / tar _ header (11)
クラス
オブジェクト
-
IRB
:: MagicFile (22)
キーワード
-
NEWS for Ruby 3
. 0 . 0 (4) - String (11)
- open (22)
-
to
_ a (11)
検索結果
先頭5件
-
Gem
:: Package :: TarHeader # magic -> String (27217.0) -
tar のヘッダに含まれる magic を返します。
...tar のヘッダに含まれる magic を返します。... -
IRB
:: MagicFile . open(path) -> File (6200.0) -
引数 path で指定したファイルを開いて、ファイル中のマジックコメントをエ ンコーディングに設定します。
...引数 path で指定したファイルを開いて、ファイル中のマジックコメントをエ
ンコーディングに設定します。
ブロックを指定した場合はブロックの実行結果を返します。ブロックを指定し
なかった場合はエンコーディング......が設定された File オブジェクトを返
します。
@param path パスを文字列で指定します。... -
IRB
:: MagicFile . open(path) { |io| . . . } -> object (6200.0) -
引数 path で指定したファイルを開いて、ファイル中のマジックコメントをエ ンコーディングに設定します。
...引数 path で指定したファイルを開いて、ファイル中のマジックコメントをエ
ンコーディングに設定します。
ブロックを指定した場合はブロックの実行結果を返します。ブロックを指定し
なかった場合はエンコーディング......が設定された File オブジェクトを返
します。
@param path パスを文字列で指定します。... -
String (6024.0)
-
文字列のクラスです。 ヌル文字を含む任意のバイト列を扱うことができます。 文字列の長さにはメモリ容量以外の制限はありません。
...つか示します。
//emlist[文字列リテラルの例][ruby]{
'str\\ing' # シングルクオート文字列 (エスケープシーケンスがほぼ無効)
"string\n" # ダブルクオート文字列 (エスケープシーケンスがすべて有効)
%q(str\\ing) # 「%q」文字列 (エ......Encoding::CompatibilityError
//}
String#eql? はハッシュのキーの比較に使われますので、
ハッシュのキーに非 ASCII 文字列を使う場合には注意が必要です。
//emlist[動作例: (注)一行目にmagic commentが必要です。][ruby]{
# encoding: UTF-8
h = {}......は"
s.force_encoding("EUC-JP")
h[s] = 1
s.force_encoding("ASCII-8BIT")
p h[s] #=> nil
//}
==== 7bit クリーンな文字列
ASCII 互換エンコーディングをもつ 7bit クリーンな文字列は
エンコーディングに関わらず ASCII として扱うこ... -
RubyVM
:: InstructionSequence # to _ a -> Array (3012.0) -
self の情報を 14 要素の配列にして返します。
...ケンスを以下の情報で表します。
: magic
データフォーマットを示す文字列。常に
"YARVInstructionSequence/SimpleDataFormat"。
: major_version
命令シーケンスのメジャーバージョン。
: minor_version
命令シーケンスのマイナーバー......ータフォーマットを示す数値。常に 1。
: misc
以下の要素から構成される Hash オブジェクト。
:arg_size: メソッド、ブロックが取る引数の総数(1 つもない場合は 0)。
:local_size: ローカル変数の総数 + 1。
:stack_max: ス......in>"。文字列から作成していた場合は
"<compiled>"。
: #path
命令シーケンスの相対パス。文字列から作成していた場合は "<compiled>"。
: #absolute_path
命令シーケンスの絶対パス。文字列から作成していた場合は nil。
: #first_li... -
NEWS for Ruby 3
. 0 . 0 (36.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...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......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 => a=>1}, {}]
//}
* Arguments forwarding (`...`) now supports leadin......less method definition is added. [EXPERIMENTAL]
16746
//emlist{
def square(x) = x * x
//}
* Interpolated String literals are no longer frozen when
`# frozen-string-literal: true` is used. 17104
* Magic comment `shareable_constant_value` added to freeze constants.
See {Magic Commen...