34件ヒット
[1-34件を表示]
(0.124秒)
キーワード
-
NEWS for Ruby 2
. 4 . 0 (8) -
NEWS for Ruby 3
. 0 . 0 (4) -
ruby 1
. 8 . 4 feature (11)
検索結果
-
optparse (38444.0)
-
コマンドラインのオプションを取り扱うためのライブラリです。
...コマンドラインのオプションを取り扱うためのライブラリです。
=== チュートリアル
optparse を使う場合、基本的には
(1) OptionParser オブジェクト opt を生成する。
(2) オプションを取り扱うブロックを opt に登録する。
(3) o......以下はオプション -a, -b を受け付けるコマンドを作成する例です。
//emlist[sample.rb][ruby]{
require 'optparse'
opt = OptionParser.new
opt.on('-a') {|v| p v }
opt.on('-b') {|v| p v }
opt.parse!(ARGV)
p ARGV
//}
↓
ruby sample.rb -a foo bar -b baz
# => true......arsers['add'] = OptionParser.new.on('-i') { puts "add -i" }
subparsers['del'] = OptionParser.new.on('-i') { puts "del -i" }
subparsers['list'] = OptionParser.new.on('-i') { puts "list -i" }
parser.order!(ARGV)
subparsers[ARGV.shift].parse!(ARGV) unless ARGV.empty?
//}
実行すると以下のよ... -
ruby 1
. 8 . 4 feature (1506.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
...されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど
* 互換性のある変更
* only backward-compatibility
* 影響の範囲が小さいと思われる変更もこちら
* [change]: 変更されたクラス/メソッドなど(互換......at]>))
* ((<ruby 1.8.4 feature/TCPSocket#initialize [bug]>))
* ((<ruby 1.8.4 feature/TCPServer#initialize [bug]>))
* ((<ruby 1.8.4 feature/"optparse">))
* ((<ruby 1.8.4 feature/"find">))
* ((<ruby 1.8.4 feature/Iconv>))
* ((<ruby 1.8.4 feature/WEBrick::Config::FileHandler [compat]>))
*.......y (dsym): prohibit empty symbol literal by interpolation.
# fixed: [ruby-talk:166529]
式展開で空のSymbolを作ることができたバグの修正。 ((<ruby-talk:166529>))
p :""
# => ruby 1.8.3 (2005-09-21) [i686-linux]
-:1: empty symbol literal... -
NEWS for Ruby 3
. 0 . 0 (312.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......=== `--help` option
When the environment variable `RUBY_PAGER` or `PAGER` is present and has
a non-empty value, and the standard input and output are tty, the `--help`
option shows the help message via the pager designated by the value.
16754
=== `--backtrace-limit` option
The `--backtrace-limit......ev
* base64
* drb
* debug
* erb
* find
* net-ftp
* net-http
* net-imap
* net-protocol
* open-uri
* optparse
* pp
* prettyprint
* resolv-replace
* resolv
* rinda
* set
* securerandom
* sh... -
NEWS for Ruby 2
. 4 . 0 (84.0) -
NEWS for Ruby 2.4.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...は参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。
== 2.3.0 以降の変更
=== 言語仕様の変更
* 条件式での多重代入ができるよ......Enumerable#sum と違って each メソッドに依存しません。
* Comparable
* Comparable#clamp を追加 10594
* Dir
* Dir.empty? を追加 10121
* Enumerable
* Enumerable#chunk ブロックを省略した場合 Enumerator を返すようになりました。2172......に分離されましたが、デフォルトGemとして残っています。
* optparse
* OptionParser#parseやOptionParser#orderにキーワード引数 into を追加 11191
* pathname
* Pathname#empty? を追加 12596
* readline
* Readline.quoting_detection_proc, Readline.qu...