るりまサーチ

最速Rubyリファレンスマニュアル検索!
40件ヒット [1-40件を表示] (0.043秒)

別のキーワード

  1. _builtin to_s
  2. openssl to_der
  3. openssl to_s
  4. _builtin to_a
  5. openssl to_pem

検索結果

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
//}...