73件ヒット
[1-73件を表示]
(0.065秒)
種類
- 特異メソッド (41)
- インスタンスメソッド (17)
- 文書 (15)
クラス
-
Rake
:: FileTask (11) -
Rake
:: Task (11) -
RubyVM
:: AbstractSyntaxTree :: Node (6) -
URI
:: LDAP (11)
モジュール
オブジェクト
- main (11)
キーワード
-
NEWS for Ruby 3
. 0 . 0 (4) - Ruby用語集 (11)
- inspect (6)
- parse (8)
-
scope
_ name (22) - using (11)
検索結果
先頭5件
-
URI
:: LDAP # scope -> String (18218.0) -
自身の Scope を文字列で返します。
...自身の Scope を文字列で返します。... -
Rake
:: FileTask . scope _ name(scope , task _ name) -> String (6303.0) -
ファイルタスクはスコープを無視します。
ファイルタスクはスコープを無視します。 -
Rake
:: Task . scope _ name(scope , task _ name) -> String (6303.0) -
与えられたスコープとタスク名をコロンで連結して返します。
与えられたスコープとタスク名をコロンで連結して返します。 -
NEWS for Ruby 3
. 0 . 0 (264.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...", "f", 3]
in [*pre, String => x, String => y, *post]
p pre #=> ["a", 1]
p x #=> "b"
p y #=> "c"
p post #=> [2, "d", "e", "f", 3]
end
//}
* Endless method definition is added. [EXPERIMENTAL]
16746
//emlist{
def square(x) = x * x
//}
* Interpolated String literals are no lo......nger frozen when
`# frozen-string-literal: true` is used. 17104
* Magic comment `shareable_constant_value` added to freeze constants.
See {Magic Comments}[rdoc-ref:doc/syntax/comments.rdoc@Magic+Comments] for more details.
17273
* A {static analysis}[rdoc-label:label-Static+analysis]......timeError is now raised (previously,
it only issued a warning in verbose mode). Additionally, accessing a
class variable 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
==... -
RubyVM
:: AbstractSyntaxTree . parse(string) -> RubyVM :: AbstractSyntaxTree :: Node (126.0) -
文字列を抽象構文木にパースし、その木の根ノードを返します。
...文字列を抽象構文木にパースし、その木の根ノードを返します。
@param string パースする対象の Ruby のコードを文字列で指定します。
@param keep_script_lines true を指定すると、 Node#script_lines でノードと関連づけられたソースコ......ドに置き換えてツリーを生成します。
@raise SyntaxError string が Ruby のコードとして正しくない場合に発生します。
//emlist[][ruby]{
pp RubyVM::AbstractSyntaxTree.parse("x = 1 + 2")
# => (SCOPE@1:0-1:9
# tbl: [:x]
# args: nil
# body:
# (LASGN@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 :... -
RubyVM
:: AbstractSyntaxTree . parse(string , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node (126.0) -
文字列を抽象構文木にパースし、その木の根ノードを返します。
...文字列を抽象構文木にパースし、その木の根ノードを返します。
@param string パースする対象の Ruby のコードを文字列で指定します。
@param keep_script_lines true を指定すると、 Node#script_lines でノードと関連づけられたソースコ......ドに置き換えてツリーを生成します。
@raise SyntaxError string が Ruby のコードとして正しくない場合に発生します。
//emlist[][ruby]{
pp RubyVM::AbstractSyntaxTree.parse("x = 1 + 2")
# => (SCOPE@1:0-1:9
# tbl: [:x]
# args: nil
# body:
# (LASGN@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 :... -
RubyVM
:: AbstractSyntaxTree . parse(string) -> RubyVM :: AbstractSyntaxTree :: Node (119.0) -
文字列を抽象構文木にパースし、その木の根ノードを返します。
...ます。
@param string パースする対象の Ruby のコードを文字列で指定します。
@raise SyntaxError string が Ruby のコードとして正しくない場合に発生します。
//emlist[][ruby]{
pp RubyVM::AbstractSyntaxTree.parse("x = 1 + 2")
# => (SCOPE@1:0-1:9
# tbl: [... -
RubyVM
:: AbstractSyntaxTree :: Node # inspect -> String (107.0) -
self のデバッグ用の情報を含んだ文字列を返します。
...self のデバッグ用の情報を含んだ文字列を返します。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 1')
puts node.inspect
# => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-1:5>
//}... -
Ruby用語集 (90.0)
-
Ruby用語集 A B C D E F G I J M N O R S Y
...cent
: 0 オリジン
: zero-based
番号が 0 から始まること。
例えば、
Array や Vector、Matrix などの要素の番号、
String における文字の位置、
といったものは 0 オリジンである。
: 1 オリジン
: one-based
番号が 1 から始まるこ......は
オブジェクトではない。
ただし、メソッド、ブロックはそれぞれオブジェクト化できる。
なお、「String オブジェクト」のような、クラス名+「オブジェクト」の
形の表現は、そのクラスのインスタンスを指す。......ァイル自体のエンコーディング。
→エンコーディング
: スクリプト探索パス
=ロードパス
: スコープ
: scope
変数・定数・メソッドなどが参照(・代入)可能な、コード上の範囲。
Ruby の定数やグローバル変数はプ... -
main
. using(module) -> self (12.0) -
引数で指定したモジュールで定義された拡張を有効にします。
...ださい。
* https://docs.ruby-lang.org/en/master/syntax/refinements_rdoc.html#label-Scope
@param module 有効にするモジュールを指定します。
//emlist[例][ruby]{
module Sloth
refine String do
def downcase
self
end
end
end
"ABC".downcase # => "abc"
using Slot...