82件ヒット
[1-82件を表示]
(0.037秒)
種類
- 文書 (37)
- インスタンスメソッド (22)
- モジュール関数 (22)
- ライブラリ (1)
クラス
- OptionParser (11)
-
Rake
:: Application (11)
モジュール
- JSON (22)
キーワード
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 3
. 0 . 0 (4) - restore (11)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 4 feature (11) -
test
/ unit (1)
検索結果
先頭5件
-
Rake
:: Application # options -> OpenStruct (36213.0) -
コマンドラインで与えられたアプリケーションのオプションを返します。
...k default: :test_rake_app
task :test_rake_app do
Rake.application.options # => #<OpenStruct always_multitask=false, backtrace=false, build_all=false, dryrun=false, ignore_deprecate=false, ignore_system=false, job_stats=false, load_system=false, nosearch=false, rakelib=["rakelib"], show_all_tasks=... -
OptionParser
# load(filename = nil) -> bool (21161.0) -
指定された filename を読み込んで各行をまとめたものに対して OptionParser#parse を行ないます。
...指定された filename を読み込んで各行をまとめたものに対して OptionParser#parse を行ないます。
パースが成功した場合に true を返します。
ファイルが存在しなかった場合に false を返します。
@param filename 各行をパースしたい......合、~/.options/ に
プログラムのサフィックスを付けた '~/.options/コマンド名' というファイルをパースします。
//emlist[例][ruby]{
require "optparse"
IO.write("options.txt", %w(-a --b).join("\n"))
options = { a: false, b: false }
OptionParser.new......do |opt|
opt.on('-a') { |v| options[:a] = v }
opt.on('--b') {|v| options[:b] = v }
opt.load("options.txt") # => true
opt.load("not_exist.txt") # => false
end
p options # => {:a=>true, :b=>true}
//}... -
JSON
. # load(source , proc = nil , options = {}) -> object (18333.0) -
与えられた JSON 形式の文字列を Ruby オブジェクトとしてロードして返します。
...SON
[1,2,3]
JSON
JSON.load(str) # => [1,2,3]
JSON.load(str, proc{|v| p v }) # => [1,2,3]
# 以下が表示される
# 1
# 2
# 3
# [1,2,3]
str=<<JSON
{ "a":1, "b":2, "c":3 }
JSON
JSON.load(str) # => {"a"=>1, "b"=>2, "c"=>3}
JSON.load(str, proc{|v| p v }) # => {"a"......str, to_io, read メソッドを持つオブジェクトも指定可能です。
@param proc Proc オブジェクトを指定します。
@param options オプションをハッシュで指定します。指定可能なオプションは以下の通りです。
: :max_nesting
入れ子になっ... -
JSON
. # restore(source , proc = nil , options = {}) -> object (3233.0) -
与えられた JSON 形式の文字列を Ruby オブジェクトとしてロードして返します。
...SON
[1,2,3]
JSON
JSON.load(str) # => [1,2,3]
JSON.load(str, proc{|v| p v }) # => [1,2,3]
# 以下が表示される
# 1
# 2
# 3
# [1,2,3]
str=<<JSON
{ "a":1, "b":2, "c":3 }
JSON
JSON.load(str) # => {"a"=>1, "b"=>2, "c"=>3}
JSON.load(str, proc{|v| p v }) # => {"a"......str, to_io, read メソッドを持つオブジェクトも指定可能です。
@param proc Proc オブジェクトを指定します。
@param options オプションをハッシュで指定します。指定可能なオプションは以下の通りです。
: :max_nesting
入れ子になっ... -
ruby 1
. 6 feature (90.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...べきです。((<ruby-dev:17193>))
ruby '-*' -v
=> ruby 1.6.7 (2002-03-01) [i586-linux]
=> ruby: invalid option -* (-h will show valid options)
: 2002-05-22 parsedate
バージョンアップ((<ruby-dev:17171>))
: 2002-05-22 -T オプション
ruby のコマンド......l
nil
nil
nil
: 2002-03-14 拡張ライブラリの autoload
拡張ライブラリに対して autoload が効いていませんでした。((<ruby-dev:16379>))
autoload :Fcntl, "fcntl"
require "fcntl"
=> -:2:in `require': uninitialized constant Fcn......6) [i586-linux]
5
: 2002-03-03 ((<Marshal/Marshal.load>))
Marshal.load が 1.7 のメソッド Proc#yield を呼んでいました。
((<ruby-dev:16178>))
Marshal.load(Marshal.dump('foo'), proc {|o| p o})
=> -:1:in `load': undefined method `yield' for #<Proc:0x401b1b30> (NameEr... -
ruby 1
. 8 . 4 feature (48.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
...グの修正。((<ruby-core:06326>))
: Thread#pass [bug]
#Sun Oct 16 03:38:07 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
#
# * eval.c (load_wait): need not to call rb_thread_schedule()
# explicitly. [ruby-core:04039]
#
# * eval.c (rb_thread_schedule): clear rb_thread_criti......n.rb, ext/tk/lib/tk/scale.rb,
# ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tk/text.rb,
# ext/tk/lib/tk/toplevel.rb: improve conversion of option values.
#
# * ext/tk/lib/tkextlib/*: ditto.
#
ウィジェットオブジェクトの属性参照をした場合に属性値として......を引数に渡
すと切り捨てられていたバグの修正。
require "optparse"
puts "[#{ARGV * ', '}]"
ARGV.options do |opt|
opt.on("-n NODE") {|v| puts v }
opt.parse!
end
>ruby -v -Ku a.rb -n 時間
ruby 1.8.2 (2004-... -
NEWS for Ruby 3
. 0 . 0 (42.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...and line options
=== `--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` option limits the maximum length of a backtrace.
8661
== Core classes updates
Outstanding ones only.
* Array
* The following methods now return Array instances instead of subclass instances when called on subclass instances: 6087
* Array#drop
* Array#drop_whil......pes of classes and modules with advanced types including union types, overloading, generics, and _interface types_ for duck typing.
* Ruby ships with type definitions for core/stdlib classes.
* `rbs` gem is bundled to load and process RBS files.
=== TypeProf
* TypeProf is a type analysis too... -
NEWS for Ruby 2
. 0 . 0 (24.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...非互換: Object#inspect は #to_s を呼び出さなくなりました。再定義された #to_s を呼び出すためです。
* LoadError
* 追加: LoadError#path ロードできなかったファイルのパスを返します
* Module
* 追加: Module#prepend 指定したモジ......した。
* Signal.trap
* 上を参照
* Onigmo をマージしました。
https://github.com/k-takata/Onigmo
* The :close_others option is true by default for system() and exec().
Also, the close-on-exec flag is set by default for all new file descriptors.
This means file......tempts.
* Support for "0/n" splitting of records as BEAST mitigation via
OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS.
* The default options for OpenSSL::SSL::SSLContext have changed to
OpenSSL::SSL::OP_ALL & ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS
instead of OpenSSL:... -
test
/ unit (24.0) -
ユニットテストを行うためのライブラリです。
...用意した test_foo.rb を実行します。
デフォルトではすべてのテストが実行されます。
$ ruby test_foo.rb
Loaded suite test_foo
Started
F.
Finished in 0.022223 seconds.
1) Failure:
test_bar(TC_Foo) [test_foo.rb:1......指定は行えません。
以下のようにすると help も表示されます。
$ ruby test_foo.rb --help
Usage: test_foo [options]
minitest options:
-h, --help Display this help.
-s, --seed SEED Sets random seed
-v, --verbose......t'll have used at -j option
-q, --hide-skip Hide skipped tests
-b, --basedir=DIR Base directory of test suites.
-x, --exclude PATTERN Exclude test files on pattern.
-Idirectory Add library load path
--[...