るりまサーチ

最速Rubyリファレンスマニュアル検索!
31件ヒット [1-31件を表示] (0.024秒)
トップページ > クエリ:FALSE[x] > クエリ:NIL[x] > クエリ:start[x] > クエリ:optparse[x]

別のキーワード

  1. _builtin nil?
  2. object nil?
  3. nilclass nil?
  4. object nil
  5. _builtin nil

種類

検索結果

optparse (38210.0)

コマンドラインのオプションを取り扱うためのライブラリです。

...コマンドラインのオプションを取り扱うためのライブラリです。

=== チュートリアル

optparse
を使う場合、基本的には

(1) OptionParser オブジェクト opt を生成する。
(2) オプションを取り扱うブロックを opt に登録する。
(3) o...
...narg
* longoption
* help
* subcmd
* argv
* hyphen_start_file

====[a:optiondef] オプションの定義

以下はオプション -a, -b を受け付けるコマンドを作成する例です。

//emlist[sample.rb][ruby]{
require 'optparse'
opt = OptionParser.new

opt.on('-a') {|v| p v }
opt....
...付けます。

//emlist[sample.rb][ruby]{
require 'optparse'
opt = OptionParser.new

opt.on('-a [VAL]') {|v| p v } # <- [VAL] を追加
opt.on('-b') {|v| p v }

opt.parse!(ARGV)
p ARGV
//}

ruby sample.rb -a

# => nil
[]

同様に、ヘルプの見栄え...

NEWS for Ruby 2.7.0 (108.0)

NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...で**nilと書くことで、このメソッドがキーワードを
受け取らないことを明示できるようになりました。このようなメソッドを
キーワード引数付きで呼び出すとArgumentErrorになります。 14183

//emlist[][ruby]{
def foo(h, **nil); en...
...めたい場合は、コマンドライン引数に
「-W:no-deprecated」を指定するか、コードの中で
「Warning[:deprecated] = false
としてください。

==== 番号指定パラメータ

* 番号指定パラメータ(Numbered parameters)がデフォルトのブロ...
...た。 15195
* Unicode絵文字のバージョンが12.1に更新されました。 16272

* Symbol
* 新規メソッド
* Symbol#start_with?とSymbol#end_with?が追加されました。 16348

* Time
* 新規メソッド
* Time#ceilが追加されました。 15772...

ruby 1.8.4 feature (72.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...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]>))
*...
...z]+x[0-9]+$/ =~ "hogex111")
p(/^[\x61-\x7a]+x[0-9]+$/ =~ "hogex111")

# => ruby 1.8.3 (2005-09-21) [i686-linux]
0
nil

# => ruby 1.8.4 (2005-12-22) [i686-linux]
0
0

: シグナル [bug]

#Sun Oct 16 03:38:07 2005 Yukihiro M...
...on VisualC++6.

VisualC++ 6 では S_IFIFO がなく _S_IFIFO しか定義されていないため、
パイプに対する stat.pipe? が false を返していたのを修正。

: Array#fill [bug]

#Tue Nov 15 14:39:16 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
#
# * array.c (rb...

NEWS for Ruby 3.0.0 (66.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...like a rightward assignment.
17260
* `in` is changed to return `true` or `false`. 17371

//emlist{
0 => a
p a #=> 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. [...
...the request headers as a Hash in the second argument when the first argument is a URI. 16686
* Net::SMTP
* Add SNI support.
* Net::SMTP.start arguments are keyword arguments.
* TLS should not check the host name by default.
* OpenStruct
* Initialization is no longer lazy. 12136...
...lambda's arity check.
* When writing to STDOUT redirected to a closed pipe, no broken pipe error message will be shown now. 14413
* `TRUE`/`FALSE`/`NIL` constants are no longer defined.
* Integer#zero? overrides Numeric#zero? for optimization. 16961
* Enumerable#grep and Enumerable#grep_v...