32件ヒット
[1-32件を表示]
(0.035秒)
別のキーワード
キーワード
-
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 3
. 0 . 0 (4) -
NEWS for Ruby 3
. 1 . 0 (3) - rdoc (11)
検索結果
-
coverage (38204.0)
-
カバレッジを測定するためのライブラリです。
...(1) require "coverage" で、ライブラリを読み込む。
(2) Coverage.start を実行し、測定を開始する。
(3) require や load で測定対象のファイルを実行する。
(4) Coverage.result や Coverage.peek_result で結果を確認する。
Coverage.result は、...... methodsカバレッジモード
methodsカバレッジモードでは、各メソッドの実行回数を計測します。
//emlist[foo_method.rb][ruby]{
class Greeter
def greet
"welcome!"
end
end
def hello
"Hi"
end
hello()
Greeter.new.greet()
//}
//emlist[][ruby]{
require "coverage......"
Coverage.start(methods: true)
load "foo_method.rb"
pp Coverage.result
# {"foo_method.rb"=>
# {:methods=>
# {[Object, :hello, 7, 0, 9, 3]=>1, [Greeter, :greet, 2, 2, 4, 5]=>1}}}
//}
キーの :methods が指すハッシュの各キーはメソッド(の識別情報)を表し、値はメソ... -
NEWS for Ruby 3
. 0 . 0 (228.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...a=>1}] # and deprecation warning
# 3.0 => a=>1}, {}]
//}
* Arguments forwarding (`...`) now supports leading arguments.
16378
//emlist{
def method_missing(meth, ...)
send(:"do_#{meth}", ...)
end
//}
* Pattern matching (`case/in`) is no longer experimental. 17260
* One-line pattern......variables with no special behavior.
C-API methods related to `$SAFE` have been removed.
16131 17136
* yield in singleton class definitions in methods is now a SyntaxError
instead of a warning. yield in a class definition outside of a method
is now a SyntaxError instead of a LocalJ......e, and prints the analysis result in RBS format.
* Though it supports only a subset of the Ruby language yet, we will continuously 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
e... -
NEWS for Ruby 2
. 5 . 0 (120.0) -
NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...2
* Method
* Method#=== は Proc#===と同じようにMethod#callを呼び出します 14142
* Module
* Module#attr, Module#attr_accessor, Module#attr_reader, Module#attr_writer はパブリックメソッドになりました 14132
* Module#define_method, Module#alias_method, Modu......igDecimal.ver
* BigDecimal#clone と BigDecimal#dup は新しいインスタンスを作らなくなりました。selfを返します。
* coverage
* ブランチカバレッジとメソッドカバレッジの計測をサポートしました 13901
この新機能と一緒にテ......す。
Coverage.start に与えるオプションによって計測する対象を指定することができます。
//emlist[][ruby]{
Coverage.start(lines: true, branches: true, methods: true)
//}
* Rubyで書かれたファイルをいくつか読み込んでから、Coverage.result... -
NEWS for Ruby 3
. 1 . 0 (60.0) -
NEWS for Ruby 3.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...* MatchData#match_length が追加されました。 18172
* Method / UnboundMethod
* 新規メソッド
* Method#public?, Method#private?, Method#protected?, UnboundMethod#public?, UnboundMethod#private?, UnboundMethod#protected? が追加されました。 11689
* Module
*......ment
* Module#refineで作成されたモジュールを表す新しいクラス。includeとprependは非推奨になり、代わりにimport_methodsが追加されました。
== 標準添付ライブラリの更新(機能追加とバグ修正を除く)
* 以下のdefault gemsが更新さ......イブラリから削除されました。
* dbm
* gdbm
* tracer
* Coverageの計測が一時停止をサポートされるようになりました。 Coverage.suspendで計測を一時停止し、Coverage.resumeで再開することができます。詳細は 18176 を参照してく... -
rdoc (48.0)
-
RDoc は Ruby のドキュメント生成を行うためのライブラリです。rdoc という ドキュメント生成のためのコマンドも含んでいます。
...: --charset charset
生成する HTML の charset を指定します。
可能であれば --encoding を使用してください。
: --coverage-report level, --dcov level
ドキュメントが記述されていない要素に関するレポートを出力します。0 以
下を指......ategory: Utility Methods
#
# CGI escapes +text+
def convert_string text
CGI.escapeHTML text
end
//}
title を省略した場合は、:section: を指定しなかった場合と同じように扱
われます。
//emlist{
# :category:
#
# This method is in the defau......lt category
def some_method
# ...
end
//}
:section: とは異なり、以降のドキュメントには影響しません。直後の要素
のみに影響します。
: :call-seq:
デフォルトではメソッドの引数や yield の引数をパースして出力しますが、...