キーワード
-
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 3 . 0 (9) -
NEWS for Ruby 3
. 0 . 0 (4) - Rubyの起動 (11)
- Ruby用語集 (11)
-
ruby 1
. 8 . 4 feature (11) - オブジェクト指向スクリプト言語 Ruby リファレンスマニュアル (11)
- メソッド呼び出し(super・ブロック付き・yield) (11)
- リテラル (11)
- 正規表現 (11)
検索結果
-
オブジェクト指向スクリプト言語 Ruby リファレンスマニュアル (23007.0)
-
オブジェクト指向スクリプト言語 Ruby リファレンスマニュアル * Ruby オフィシャルサイト https://www.ruby-lang.org/ja/ * 原著:まつもとゆきひろ * 最新版URL: https://www.ruby-lang.org/ja/documentation/
...uby オフィシャルサイト https://www.ruby-lang.org/ja/
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃っています。
標準添付ライブラリのリファレン....../intro
* spec/commands
* spec/rubycmd
* spec/envvars
==== Ruby 言語仕様
Ruby でのオブジェクト:
* spec/object
* spec/class
プロセスの実行:
* spec/eval
* spec/terminate
* spec/thread
* spec/safelevel
Ruby の文法:
* spec/lexical
* spec/program
* spec/varia......ec/literal
* spec/operator
* spec/control
* spec/call
* spec/def
その他:
* spec/m17n
* spec/regexp
* spec/lambda_proc
==== 組み込みライブラリ
* _builtin
==== 標準添付ライブラリ
* /
==== C API
* /
==== その他
* news/index
* pack_template
* print_......ニュアル
* Ruby オフィシャルサイト https://www.ruby-lang.org/ja/
* version 2.3 対応リファレンス
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃って......ニュアル
* Ruby オフィシャルサイト https://www.ruby-lang.org/ja/
* version 2.4 対応リファレンス
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃って......ニュアル
* Ruby オフィシャルサイト https://www.ruby-lang.org/ja/
* version 2.5 対応リファレンス
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃って......ニュアル
* Ruby オフィシャルサイト https://www.ruby-lang.org/ja/
* version 2.6 対応リファレンス
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃って......ニュアル
* Ruby オフィシャルサイト https://www.ruby-lang.org/ja/
* version 2.7 対応リファレンス
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃って......ニュアル
* Ruby オフィシャルサイト https://www.ruby-lang.org/ja/
* version 3.0 対応リファレンス
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃って......ニュアル
* Ruby オフィシャルサイト https://www.ruby-lang.org/ja/
* version 3.1 対応リファレンス
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃って......ニュアル
* Ruby オフィシャルサイト https://www.ruby-lang.org/ja/
* version 3.2 対応リファレンス
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃って......c/intro
* spec/commands
* spec/rubycmd
* spec/envvars
==== Ruby 言語仕様
Ruby でのオブジェクト:
* spec/object
* spec/class
プロセスの実行:
* spec/eval
* spec/terminate
* spec/thread
Ruby の文法:
* spec/lexical
* spec/program
* spec/variables
* spec/lite......f
その他:
* spec/m17n
* spec/regexp
* spec/lambda_proc
==== 組み込みライブラリ
* _builtin
==== 標準添付ライブラリ
* /
==== C API
* /
==== その他
* news/index
* pack_template
* print_format
* glossary
* symref
* marshal_format
* license
* help......ニュアル
* Ruby オフィシャルサイト https://www.ruby-lang.org/ja/
* version 3.3 対応リファレンス
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃って... -
リテラル (6073.0)
-
リテラル * num * string * backslash * exp * char * command * here * regexp * array * hash * range * symbol * percent
...リテラル
* num
* string
* backslash
* exp
* char
* command
* here
* regexp
* array
* hash
* range
* symbol
* percent
数字の1や文字列"hello world"のようにRubyのプログラムの中に直接
記述できる値の事をリテラルといいます。
===[a:n......恐れがあるため、6.022e+23r のような指数部に有理数リ
テラルを含む形式は指定できません。
: 42i
: 3.14i
複素数
: 42ri
: 3.14ri
虚数部が有理数の複素数
数値リテラルには、`_' を含めることができます。
ruby インタプリタ......efix の直後に書くことはできません。また、_ を連続して
書いてもエラーになります。他、細かい部分でこのあたりの規則は見直され統
一されました。
//emlist[][ruby]{
1_000_000_000 # => 1000000000
0xffff_ffff # => 0xffffffff
//}
===[a:strin... -
メソッド呼び出し(super・ブロック付き・yield) (3085.0)
-
メソッド呼び出し(super・ブロック付き・yield) * super * block * yield * block_arg * numbered_parameters * call_method
...メソッド呼び出し(super・ブロック付き・yield)
* super
* block
* yield
* block_arg
* numbered_parameters
* call_method
//emlist[例][ruby]{
foo.bar()
foo.bar
bar()
print "hello world\n"
print
Class.new
Class::new
//}
文法:
[式 `.'] 識別子 [`(' [[`*']......`.' と `::' とはほぼ同じ意味です。但し、定数を表す場合は、
`::' を使わなければいけません(例: Math::PI)。逆に、
//emlist[][ruby]{
Klass::Foo
//}
とした場合、常に定数と見なされるという制限があります。
`::' を、クラスメソッ......がありますが、
この点は要注意です。大文字で始まるメソッド名を使用する場合は
//emlist[][ruby]{
Klass.Foo
//}
と `.' を使うか、
//emlist[][ruby]{
Klass::Foo()
//}
と括弧でメソッド呼び出しであることを明示する必要があります。... -
ruby 1
. 8 . 4 feature (169.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
...更
# * [api]: 拡張ライブラリ API
# * [lib]: ライブラリ
* レベル
* [bug]: バグ修正
* [new]: 追加されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど
* 互換性のある変更
* only backward-compatibility
* 影......bccwin32 [bug]>))
* ((<ruby 1.8.4 feature/cygwin [bug]>))
* ((<ruby 1.8.4 feature/BeOS [bug]>))
* ((<ruby 1.8.4 feature/Sun [bug]>))
* ((<ruby 1.8.4 feature/IA64 [bug]>))
== Ruby本体
: Symbol [bug]
# * parse.y (dsym): prohibit empty symbol literal by interpolation.
# fixed......ラスのサンプル兼ライブラリ
#Wed Dec 7 01:02:04 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
#
# * ext/tk/README.macosx-aqua: [new document] tips to avoid the known
# bug on platform specific dialogs of Tcl/Tk Aqua on MacOS X.
MacOS X 上で Aqua 版の Tcl/Tk... -
正規表現 (103.0)
-
正規表現 * metachar * expansion * char * anychar * string * str * quantifier * capture * grouping * subexp * selector * anchor * cond * option * encoding * comment * free_format_mode * absenceop * list * specialvar * references
...achar
* expansion
* char
* anychar
* string
* str
* quantifier
* capture
* grouping
* subexp
* selector
* anchor
* cond
* option
* encoding
* comment
* free_format_mode
* absenceop
* list
* specialvar
* references
正規表現(regular expression)は文字列......るかどうかを判定し、
また含んでいるならばそれが文字列中のどの場所であるかを知ることができます。
//emlist[][ruby]{
/pat/
%r{pat}
//}
などの正規表現リテラルや Regexp.new などで正規表現
オブジェクトを得ることができます......文字列そのものにマッチするような文字列があります。
前者をメタ文字列(meta string)、後者をリテラル(文字列)(literal string)と呼びます。
//emlist[][ruby]{
/京都|大阪|神戸/
//}
という正規表現においては、「京都」「大阪」「神... -
Ruby用語集 (101.0)
-
Ruby用語集 A B C D E F G I J M N O R S Y
...by用語集
A B C D E F G I J M N O R S Y
a ka sa ta na ha ma ya ra wa
=== 記号・数字
: %記法
: % notation
「%」記号で始まる多種多様なリテラル記法の総称。
参照:d:spec/literal#percent
: 0 オリジン
: zero-base......d
番号が 0 から始まること。
例えば、
Array や Vector、Matrix などの要素の番号、
String における文字の位置、
といったものは 0 オリジンである。
: 1 オリジン
: one-based
番号が 1 から始まること。
例えば、
エラー......ージョンの Ruby をインストールし、切り替えて使うための
ツールの一つ。Linux、macOS などで動作する。
https://github.com/rbenv/rbenv
: RD(Ruby Document format)
Ruby スクリプト中に記述することを念頭に作られたドキュメントフ... -
Rubyの起動 (61.0)
-
Rubyの起動 * cmd_option * shebang
...Rubyの起動
* cmd_option
* shebang
Rubyインタプリタの起動は以下の書式のコマンドラインにより行います。
ruby [ option ...] [ -- ] [ programfile ] [ argument ...]
ここで、option は後述のcmd_option
のいずれかを指定します。-- は、オプシ......を明示するため
に使用できます。programfile は、Ruby スクリプトを記述したファイ
ルです。これを省略したり`-' を指定した場合には標準入力を Ruby ス
クリプトとみなします。
programfile が `#!' で始まるファイルである場合、......カードを展開しない環境
(platform/Win32)では、Ruby インタプリタが自前でワイルドカードを展開して
Object::ARGV に設定します。この場合ワイルドカードとして
`*', `?', `[]', `**/' が使用できます。Win32 環境で、
ワイルドカード展開... -
NEWS for Ruby 2
. 3 . 0 (43.0) -
NEWS for Ruby 2.3.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
... issue を参照してください。
== 2.2.0 以降の変更
=== 言語仕様の変更
* frozen-string-literal プラグマ:
* 実験的な機能として fronzen-string-literal というプラグマが導入されました。
8976
* さらに --enable/--disable=frozen-string-li......ug または --debug=frozen-string-literal を付けて実行すると、
freeze された文字列を操作しようとして RuntimeError が発生したときにそのオブジェクトが生成された位置を表示します。
11725
* safe navigation operator (ぼっち演算......。これは object が nil でないときにメソッド foo を呼び出します。
Active Support の try! と似ていますが、メソッド名は文法的に必須であるという点が異なります。
11537
//emlist{
obj.try! {} # valid
obj&. {} # syn... -
NEWS for Ruby 2
. 1 . 0 (37.0) -
NEWS for Ruby 2.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...報があるため短いです。
十分な情報と共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。
== 2.0.0 以降の変更
=== 言語仕様の変更
* キーワード引数のデフォルト値が省略可......尾に'r','i','ri'という接尾辞を付けられるようになりました
//emlist{
# r を付けると有理数になる
42r # => Rational(42, 1)
3.14 # => 3.14.rationalize
6.022e+23r # 指数形式と一緒には使えない
# i を付けると虚数単位 i を掛けた......数になる
42i # => Complex(0, 42)
3.14i # => Complex(0, 3.14)
# ri を付けると複素数の虚部が有理数になる
42ri # => Complex(0, 42r)
3.14ri # => Complex(0, 3.14r)
//}
* def によるメソッド定義式は nil の代わりにメソッド名をシンボ... -
NEWS for Ruby 3
. 0 . 0 (19.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......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...