種類
- 特異メソッド (90)
- インスタンスメソッド (89)
- モジュール関数 (44)
- 文書 (26)
ライブラリ
- ビルトイン (102)
- rake (77)
-
rdoc
/ context (11) - uri (33)
クラス
- Module (11)
-
RDoc
:: Context (11) -
Rake
:: FileTask (11) -
Rake
:: Task (11) -
Rake
:: TaskArguments (11) -
RubyVM
:: AbstractSyntaxTree :: Node (12) -
URI
:: LDAP (33)
モジュール
- ObjectSpace (44)
- Rake (11)
-
Rake
:: TaskManager (33) -
RubyVM
:: AbstractSyntaxTree (24)
オブジェクト
- main (11)
キーワード
-
NEWS for Ruby 3
. 0 . 0 (4) - Ruby用語集 (11)
- [] (11)
- application (11)
- build (22)
-
current
_ scope (11) -
each
_ object (44) -
find
_ enclosing _ module _ named (11) - inspect (6)
- lookup (11)
-
new
_ scope (11) - of (8)
- parse (8)
-
parse
_ file (8) -
scope
_ name (22) - type (6)
- using (22)
- 変数と定数 (11)
検索結果
先頭5件
-
URI
:: LDAP # scope -> String (18217.0) -
自身の Scope を文字列で返します。
...自身の Scope を文字列で返します。... -
Rake
:: FileTask . scope _ name(scope , task _ name) -> String (6302.0) -
ファイルタスクはスコープを無視します。
ファイルタスクはスコープを無視します。 -
Rake
:: Task . scope _ name(scope , task _ name) -> String (6302.0) -
与えられたスコープとタスク名をコロンで連結して返します。
与えられたスコープとタスク名をコロンで連結して返します。 -
Rake
:: TaskArguments # new _ scope(names) -> Rake :: TaskArguments (6207.0) -
与えられたパラメータ名のリストを使用して新しい Rake::TaskArguments を作成します。
...default: :test_rake_app
task :test_rake_app do
arguments = Rake::TaskArguments.new(["name1", "name2"], ["value1", "value2"])
new_arguments = arguments.new_scope(["name3", "name4"])
p new_arguments # => #<Rake::TaskArguments >
p new_arguments.names # => ["name3", "name4"]
end
//}... -
Rake
:: TaskManager # current _ scope -> Array (6207.0) -
現在のスコープを返します。
...現在のスコープを返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.application.current_scope # => LL()
end
//}... -
NEWS for Ruby 3
. 0 . 0 (300.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...mlist{
def method_missing(meth, ...)
send(:"do_#{meth}", ...)
end
//}
* Pattern matching (`case/in`) is no longer experimental. 17260
* One-line pattern matching is redesigned. [EXPERIMENTAL]
* `=>` is added. It can be used like a rightward assignment.
17260
* `in......> 0
{b: 0, c: 1} => {b:}
p b #=> 0
//}
//emlist{
# version 3.0
0 in 1 #=> false
# version 2.7
0 in 1 #=> raise NoMatchingPatternError
//}
* Find-pattern is added. [EXPERIMENTAL]
16828
//emlist{
case ["a", 1, "b", "c", 2, "d", "e", "f", 3]
in [*pre, String => x, String => y, *post]
p pr......ariable from the toplevel scope is now a RuntimeError.
14541
* Assigning to a numbered parameter is now a SyntaxError instead of
a warning.
== Command line options
=== `--help` option
When the environment variable `RUBY_PAGER` or `PAGER` is present and has
a non-empty value, and the sta... -
Rake
:: TaskManager # lookup(task _ name , initial _ scope = nil) -> Rake :: Task | nil (207.0) -
与えられたタスク名にマッチするタスクを検索します。
...コープが省略された場合は
現在のスコープを使用します。
@param task_name タスク名を指定します。
@param initial_scope 検索するスコープを指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rak... -
Rake
:: TaskManager # [](task _ name , scopes = nil) -> Rake :: Task (200.0) -
与えられたタスク名にマッチするタスクを検索します。
...与えられたタスク名にマッチするタスクを検索します。
@param task_name タスク名を指定します。
@param scopes スコープを指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.applica... -
RubyVM
:: AbstractSyntaxTree . parse(string) -> RubyVM :: AbstractSyntaxTree :: Node (190.0) -
文字列を抽象構文木にパースし、その木の根ノードを返します。
..."x = 1 + 2")
# => (SCOPE@1:0-1:9
# tbl: [:x]
# args: nil
# body:
# (LASGN@1:0-1:9 :x
# (OPCALL@1:4-1:9 (LIT@1:4-1:5 1) :+ (LIST@1:8-1:9 (LIT@1:8-1:9 2) nil))))
pp RubyVM::AbstractSyntaxTree.parse("x = 1; p(x; y=2", error_tolerant: true)
# => (SCOPE@1:0-1:15
# tbl: [:......x, :y]
# args: nil
# body: (BLOCK@1:0-1:15 (LASGN@1:0-1:5 :x (LIT@1:4-1:5 1)) (ERROR@1:7-1:11) (LASGN@1:12-1:15 :y (LIT@1:14-1:15 2))))
//}... -
RubyVM
:: AbstractSyntaxTree . parse(string , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node (190.0) -
文字列を抽象構文木にパースし、その木の根ノードを返します。
..."x = 1 + 2")
# => (SCOPE@1:0-1:9
# tbl: [:x]
# args: nil
# body:
# (LASGN@1:0-1:9 :x
# (OPCALL@1:4-1:9 (LIT@1:4-1:5 1) :+ (LIST@1:8-1:9 (LIT@1:8-1:9 2) nil))))
pp RubyVM::AbstractSyntaxTree.parse("x = 1; p(x; y=2", error_tolerant: true)
# => (SCOPE@1:0-1:15
# tbl: [:......x, :y]
# args: nil
# body: (BLOCK@1:0-1:15 (LASGN@1:0-1:5 :x (LIT@1:4-1:5 1)) (ERROR@1:7-1:11) (LASGN@1:12-1:15 :y (LIT@1:14-1:15 2))))
//}... -
RubyVM
:: AbstractSyntaxTree . of(proc) -> RubyVM :: AbstractSyntaxTree :: Node (172.0) -
引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。
...proc {1 + 2})
# => (SCOPE@2:38-2:45
# tbl: []
# args: nil
# body:
# (OPCALL@2:39-2:44 (LIT@2:39-2:40 1) :+
# (LIST@2:43-2:44 (LIT@2:43-2:44 2) nil)))
def hello
puts "hello, world"
end
pp RubyVM::AbstractSyntaxTree.of(method(:hello))
# => (SCOPE@5:0-7:3
# tbl: []
#......(ARGS@5:9-5:9
# pre_num: 0
# pre_init: nil
# opt: nil
# first_post: nil
# post_num: 0
# post_init: nil
# rest: nil
# kw: nil
# kwrest: nil
# block: nil)
# body:
# (FCALL@6:2-6:21 :puts (LIST@6:7-6:21 (STR@6:7-6:21 "hell... -
RubyVM
:: AbstractSyntaxTree . of(proc , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node (172.0) -
引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。
...proc {1 + 2})
# => (SCOPE@2:38-2:45
# tbl: []
# args: nil
# body:
# (OPCALL@2:39-2:44 (LIT@2:39-2:40 1) :+
# (LIST@2:43-2:44 (LIT@2:43-2:44 2) nil)))
def hello
puts "hello, world"
end
pp RubyVM::AbstractSyntaxTree.of(method(:hello))
# => (SCOPE@5:0-7:3
# tbl: []
#......(ARGS@5:9-5:9
# pre_num: 0
# pre_init: nil
# opt: nil
# first_post: nil
# post_num: 0
# post_init: nil
# rest: nil
# kw: nil
# kwrest: nil
# block: nil)
# body:
# (FCALL@6:2-6:21 :puts (LIST@6:7-6:21 (STR@6:7-6:21 "hell... -
RubyVM
:: AbstractSyntaxTree . parse _ file(pathname) -> RubyVM :: AbstractSyntaxTree :: Node (154.0) -
pathname のファイルを読み込み、その内容を抽象構文木にパースし、その木の根ノードを返します。
...ILE__)
# => (SCOPE@1:0-1:50
# tbl: []
# args: nil
# body:
# (FCALL@1:0-1:50 :pp
# (LIST@1:3-1:50
# (CALL@1:3-1:50
# (COLON2@1:3-1:29 (CONST@1:3-1:9 :RubyVM) :AbstractSyntaxTree)
# :parse_file (LIST@1:41-1:49 (STR@1:41-1:49 "") nil)... -
RubyVM
:: AbstractSyntaxTree . parse _ file(pathname , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node (154.0) -
pathname のファイルを読み込み、その内容を抽象構文木にパースし、その木の根ノードを返します。
...ILE__)
# => (SCOPE@1:0-1:50
# tbl: []
# args: nil
# body:
# (FCALL@1:0-1:50 :pp
# (LIST@1:3-1:50
# (CALL@1:3-1:50
# (COLON2@1:3-1:29 (CONST@1:3-1:9 :RubyVM) :AbstractSyntaxTree)
# :parse_file (LIST@1:41-1:49 (STR@1:41-1:49 "") nil)...