40件ヒット
[1-40件を表示]
(0.043秒)
種類
- インスタンスメソッド (12)
- ライブラリ (11)
- 文書 (11)
- 特異メソッド (6)
ライブラリ
-
shell
/ command-processor (6) -
shell
/ filter (12)
クラス
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (12)
キーワード
-
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 3
. 0 . 0 (4) -
add
_ delegate _ command _ to _ shell (6) -
optparse
/ date (11) - | (6)
検索結果
先頭5件
-
Shell
:: Filter # to _ s -> String (18113.0) -
実行結果を文字列で返します。
...実行結果を文字列で返します。
require 'shell'
Shell.def_system_command("wc")
sh = Shell.new
sh.transact {
puts (cat("/etc/passwd") | wc("-l")).to_s
}... -
Shell
:: CommandProcessor . add _ delegate _ command _ to _ shell(id) (15201.0) -
@todo
@todo
Shell 自体を初期化する時に呼び出されるメソッドです。
ユーザが使用することはありません。
@param id メソッド名を指定します。 -
Shell
:: Filter # |(filter) -> object (30.0) -
パイプ結合を filter に対して行います。
...'
Shell.def_system_command("tail")
Shell.def_system_command("head")
Shell.def_system_command("wc")
sh = Shell.new
sh.transact {
i = 1
while i <= (cat("/etc/passwd") | wc("-l")).to_s.chomp.to_i
puts (cat("/etc/passwd") | head("-n #{i}") | tail("-n 1")).to_s
i += 1
en... -
NEWS for Ruby 2
. 5 . 0 (18.0) -
NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...11547
* do/end ブロック内部で rescue/else/ensure を書けるようになりました 12906
* 文字列の式展開内部の暗黙の to_s 呼び出しにも refinements が影響するようになりました 13812
=== 組み込みクラスの更新
* Array
* Array#append を......ml
* https://blog.rubygems.org/2017/08/27/2.6.13-released.html
* securerandom
* SecureRandom.alphanumeric を追加
* set
* Set#to_s を Set#inspect の別名として追加 13676
* Set#=== を Set#include? の別名として追加 13801
* Set#reset 6589
* stringio......* gdbm
* ipaddr
* scanf
* sdbm
* stringio
* strscan
* webrick
* zlib
* Logger
* Logger.new("| command") は意図せず、コマンドを実行していましたが、禁止されました。
Logger#initialize の引数は仕様としてフ... -
NEWS for Ruby 3
. 0 . 0 (12.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...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
=== `--help` option
When the environment variable `RUBY_PAGER` or `PAGER` is present and has
a non-empty value, and the standard i......tinuously improve the coverage of language features, analysis performance, and usability.
//emlist[][ruby]{
# test.rb
def foo(x)
if x > 10
x.to_s
else
nil
end
end
foo(42)
//}
//emlist{
$ typeprof test.rb
# Classes
class Object
def foo : (Integer) -> String?
end
//}
== Miscellaneo... -
optparse
/ date (12.0) -
OptionParser#on で使用可能なクラスに Date と DateTime が 追加されます。 オプションの引数はそれぞれのクラスのインスタンスに変換されてから、 OptionParser#on のブロックに渡されます。
...はそれぞれのクラスのインスタンスに変換されてから、
OptionParser#on のブロックに渡されます。
//emlist[][ruby]{
require 'optparse/date'
opts = OptionParser.new
opts.on("-d DATE", Date){|d|
p d.to_s #=> 2000-01-01
}
opts.parse!
# ruby command -d 2000/1/1
//}...