16件ヒット
[1-16件を表示]
(0.034秒)
検索結果
-
RubyVM
:: InstructionSequence # absolute _ path -> String | nil (18232.0) -
self が表す命令シーケンスの絶対パスを返します。
...f を文字列から作成していた場合は nil を返します。
例1:irb で実行した場合
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.absolute_path
# => nil
例2: RubyVM::InstructionSequence.compile_fi......le を使用した場合
# /tmp/method.rb
def hello
puts "hello, world"
end
# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.absolute_path # => "/tmp/method.rb"
@see RubyVM::InstructionSequence#path... -
NEWS for Ruby 2
. 7 . 0 (312.0) -
NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...p b #=> 1
p c #=> [2, 3]
end
//}
//emlist[][ruby]{
case {a: 0, b: 1}
in {a: 0, x: 1}
:unreachable
in {a: 0, b: var}
p var #=> 1
end
//}
//emlist[][ruby]{
case -1
in 0 then :unreachable
in 1 then :unreachable
end #=> NoMatchingPatternError
//}
//emlist{
json = <<END
{
"name": "Alice",
"a......ましたが、
再び許容されるようになりました。 15658
//emlist[][ruby]{
def foo(**kw); p kw; end; foo("str" => 1) #=> {"str"=>1}
//}
* メソッド定義で**nilと書くことで、このメソッドがキーワードを
受け取らないことを明示できるよう......発生させます。 10344
* File
* 新規メソッド
* パスが絶対パスかどうかをポータブルに判定するFile.absolute_path?メソッドが追加されました。 15868
* 変更されたメソッド
* Windows以外のプラットフォームでFile.extname...