y10k / ruby-japanize Goto Github PK
View Code? Open in Web Editor NEW日本語のキーワードや構文を定義してRubyを日本語で書けるようにする。
License: MIT License
日本語のキーワードや構文を定義してRubyを日本語で書けるようにする。
License: MIT License
日本語化はhttps://docs.ruby-lang.org/ja/latest/doc/index.htmlを元にしたが、ここに列挙されてない定数があるようなので、洗い出して日本語化する。
元の英語名に準拠するためアンダーバー(_
)で区切って接頭辞を付ける。
問題を再現するコード:
部(日本語化) {
部(:試験) {
組(:物の土台の操作の試験, 原型: 試験単位::試験事例) {
資料('物' => 物,
'物の土台' => 物の土台)
試験('不明な操作の呼び出しが発生することを確認') {|資料|
物の組 = 資料
ある物 = 物の組.新規
# 例外が発生することを確認(操作が無いため失敗) {
ある物.出鱈目
# }
}
}
}
}
発生した事象:
-*- mode: compilation; default-directory: "~/git_work/ruby-japanize/test/" -*-
Compilation started at Wed Oct 23 15:17:37
bundle exec ruby /home/toki/git_work/ruby-japanize/test/test_base.rb --no-use-color -v --location\=416
Loaded suite /home/toki/git_work/ruby-japanize/test/test_base
Started
Test::Unit::JA試験事例:
JA::JA試験::JA物の土台の操作の試験:
test: 不明な操作の呼び出しが発生することを確認[物]: E
==========================================================================================================================================================================
/home/toki/git_work/ruby-japanize/test/test_base.rb:414:in `block (4 levels) in <main>'
Error: test: 不明な操作の呼び出しが発生することを確認[物](JA::JA試験::JA物の土台の操作の試験): NoMethodError: undefined method `出鱈目' for #<Object:0x00007fffe765d530>
==========================================================================================================================================================================
: (0.006622)
test: 不明な操作の呼び出しが発生することを確認[物の土台]: E
==========================================================================================================================================================================
/home/toki/git_work/ruby-japanize/test/test_base.rb:414:in `block (4 levels) in <main>'
/home/toki/git_work/ruby-japanize/lib/japanize/base.rb:186:in `block (2 levels) in <top (required)>'
/home/toki/git_work/ruby-japanize/lib/japanize/base.rb:496:in `block (3 levels) in <top (required)>'
/home/toki/git_work/ruby-japanize/lib/japanize/base.rb:498:in `rescue in block (3 levels) in <top (required)>'
/home/toki/git_work/ruby-japanize/lib/japanize/base.rb:186:in `block (2 levels) in <top (required)>'
/home/toki/git_work/ruby-japanize/lib/japanize/base.rb:496:in `block (3 levels) in <top (required)>'
/home/toki/git_work/ruby-japanize/lib/japanize/base.rb:498:in `rescue in block (3 levels) in <top (required)>'
/home/toki/git_work/ruby-japanize/lib/japanize/base.rb:186:in `block (2 levels) in <top (required)>'
/home/toki/git_work/ruby-japanize/lib/japanize/base.rb:496:in `block (3 levels) in <top (required)>'
/home/toki/git_work/ruby-japanize/lib/japanize/base.rb:498:in `rescue in block (3 levels) in <top (required)>'
/home/toki/git_work/ruby-japanize/lib/japanize/base.rb:186:in `block (2 levels) in <top (required)>'
/home/toki/git_work/ruby-japanize/lib/japanize/base.rb:496:in `block (3 levels) in <top (required)>'
...
/home/toki/git_work/ruby-japanize/lib/japanize/base.rb:186:in `block (2 levels) in <top (required)>'
Error: test: 不明な操作の呼び出しが発生することを確認[物の土台](JA::JA試験::JA物の土台の操作の試験): SystemStackError: stack level too deep
==========================================================================================================================================================================
: (17.567496)
Finished in 17.5752272 seconds.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2 tests, 0 assertions, 0 failures, 2 errors, 0 pendings, 0 omissions, 0 notifications
0% passed
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
0.11 tests/s, 0.00 assertions/s
Compilation exited abnormally with code 1 at Wed Oct 23 15:17:57
問題の再現コード:
試験('引数の移譲で名前付き引数と混同せずに連想配列を渡せることを確認') {
空の連想配列 = {}
ある物 = 組.新規(物) {|ある組|
組(ある組) {
定義(:初期化) {|甲|
@甲 = 甲
}
読み取り属性 :甲
}
}.新規(空の連想配列)
等しいことを確認(空の連想配列, ある物.甲)
}
問題の再現結果:
$ git --no-pager log --oneline v0.1.0..origin/master
a5b8d21 (rb270_preview2/master, origin/master) 日本語化のための最小限の仕組み: 部/組の定義の簡略な表現のリファクタリング
897e4f4 (gut/rb270_preview2, rb270_preview2) スレッドの操作: 名前付き引数を明示的に移譲する (#3)
90ee636 時刻の操作: 名前付き引数を明示的に移譲する (#3)
8fd9d1f 基本的な部/組の操作: 名前付き引数を明示的に移譲する (#3)
1b00186 日本語化のための最小限の仕組み: 名前付き引数を明示的に移譲する (#3)
91b138a 日本語化のための最小限の仕組み: Rubyのバージョンを確認する (#3)
2998ad5 日本語化のための最小限の仕組み: 組の定義の警告が出ないようにする (#3)
4fc61b9 数値の操作を日本語化: Ruby 2.7からFloat::ROUNDSが非推奨になった対応 (#3)
2f00c74 spec: 開発用にwarning gemを追加する (#3)
1fd4046 日本語化のための最小限の仕組み: 日本語の定数のリファクタリング
f798184 基本的な部/組の操作: 物の土台でシステムのスタックが超過する問題を修正する (#2)
7873e3e 基本的な部/組の操作: 試験のリファクタリング
a4cca2a 基本的な部/組の操作: initializeの日本語の別名を物の土台に移す (#1)
2e24e79 基本的な部/組の操作: 物の操作の日本語の別名を核に移す (#1)
9367432 start to version 0.2.0
$ git bisect start origin/master v0.1.0
Bisecting: 7 revisions left to test after this (roughly 3 steps)
[2f00c74edede5fb7aaf4845a6f3921cdcbf0ee2c] spec: 開発用にwarning gemを追加する (#3)
$ git bisect run bundle exec ruby tmp/test_base.rb -v --name='/引数の移譲で名前付き引数と混同せずに連想配列を渡せることを確認/'
running bundle exec ruby tmp/test_base.rb -v --name=/引数の移譲で名前付き引数と混同せずに連想配列を渡せることを確認/
Loaded suite tmp/test_base
Started
Test::Unit::JA試験事例:
JA::JA試験::JA物の操作の試験:
test: 引数の移譲で名前付き引数と混同せずに連想配列を渡せることを確認: .: (0.000615)
Finished in 0.0016079 seconds.
------------------------------------------------------------------------------------------------------------------------------------------------------
1 tests, 1 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
------------------------------------------------------------------------------------------------------------------------------------------------------
621.93 tests/s, 621.93 assertions/s
Bisecting: 3 revisions left to test after this (roughly 2 steps)
[1b001863016024a1992c97da46dddc7e6c5fbaca] 日本語化のための最小限の仕組み: 名前付き引数を明示的に移譲する (#3)
running bundle exec ruby tmp/test_base.rb -v --name=/引数の移譲で名前付き引数と混同せずに連想配列を渡せることを確認/
Loaded suite tmp/test_base
Started
Test::Unit::JA試験事例:
JA::JA試験::JA物の操作の試験:
test: 引数の移譲で名前付き引数と混同せずに連想配列を渡せることを確認: .: (0.000730)
Finished in 0.0021764 seconds.
------------------------------------------------------------------------------------------------------------------------------------------------------
1 tests, 1 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
------------------------------------------------------------------------------------------------------------------------------------------------------
459.47 tests/s, 459.47 assertions/s
Bisecting: 1 revision left to test after this (roughly 1 step)
[90ee636a70aa9c5fb1c7e91874fc02c60366da5c] 時刻の操作: 名前付き引数を明示的に移譲する (#3)
running bundle exec ruby tmp/test_base.rb -v --name=/引数の移譲で名前付き引数と混同せずに連想配列を渡せることを確認/
Loaded suite tmp/test_base
Started
Test::Unit::JA試験事例:
JA::JA試験::JA物の操作の試験:
test: 引数の移譲で名前付き引数と混同せずに連想配列を渡せることを確認: E
======================================================================================================================================================
tmp/test_base.rb:546:in `block (4 levels) in <main>'
/home/toki/git_work/ruby-japanize/lib/japanize/base.rb:168:in `block (2 levels) in <top (required)>'
/home/toki/git_work/ruby-japanize/lib/japanize/core.rb:203:in `block in <module:Japanize>'
/home/toki/git_work/ruby-japanize/lib/japanize/core.rb:203:in `new'
/home/toki/git_work/ruby-japanize/lib/japanize/base.rb:271:in `block (3 levels) in <top (required)>'
/home/toki/git_work/ruby-japanize/lib/japanize/core.rb:203:in `block in <module:Japanize>'
tmp/test_base.rb:541:in `block (7 levels) in <main>'
Error: test: 引数の移譲で名前付き引数と混同せずに連想配列を渡せることを確認(JA::JA試験::JA物の操作の試験): ArgumentError: wrong number of arguments (given 0, expected 1)
======================================================================================================================================================
: (0.002027)
Finished in 0.0030577 seconds.
------------------------------------------------------------------------------------------------------------------------------------------------------
1 tests, 0 assertions, 0 failures, 1 errors, 0 pendings, 0 omissions, 0 notifications
0% passed
------------------------------------------------------------------------------------------------------------------------------------------------------
327.04 tests/s, 0.00 assertions/s
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[8fd9d1f7dcfd616cd94b21743e8ba6582ca011d0] 基本的な部/組の操作: 名前付き引数を明示的に移譲する (#3)
running bundle exec ruby tmp/test_base.rb -v --name=/引数の移譲で名前付き引数と混同せずに連想配列を渡せることを確認/
Loaded suite tmp/test_base
Started
Test::Unit::JA試験事例:
JA::JA試験::JA物の操作の試験:
test: 引数の移譲で名前付き引数と混同せずに連想配列を渡せることを確認: E
======================================================================================================================================================
tmp/test_base.rb:546:in `block (4 levels) in <main>'
/home/toki/git_work/ruby-japanize/lib/japanize/base.rb:168:in `block (2 levels) in <top (required)>'
/home/toki/git_work/ruby-japanize/lib/japanize/core.rb:203:in `block in <module:Japanize>'
/home/toki/git_work/ruby-japanize/lib/japanize/core.rb:203:in `new'
/home/toki/git_work/ruby-japanize/lib/japanize/base.rb:271:in `block (3 levels) in <top (required)>'
/home/toki/git_work/ruby-japanize/lib/japanize/core.rb:203:in `block in <module:Japanize>'
tmp/test_base.rb:541:in `block (7 levels) in <main>'
Error: test: 引数の移譲で名前付き引数と混同せずに連想配列を渡せることを確認(JA::JA試験::JA物の操作の試験): ArgumentError: wrong number of arguments (given 0, expected 1)
======================================================================================================================================================
: (0.002748)
Finished in 0.0043208 seconds.
------------------------------------------------------------------------------------------------------------------------------------------------------
1 tests, 0 assertions, 0 failures, 1 errors, 0 pendings, 0 omissions, 0 notifications
0% passed
------------------------------------------------------------------------------------------------------------------------------------------------------
231.44 tests/s, 0.00 assertions/s
8fd9d1f7dcfd616cd94b21743e8ba6582ca011d0 is the first bad commit
commit 8fd9d1f7dcfd616cd94b21743e8ba6582ca011d0
Author: TOKI Yoshinori <[email protected]>
Date: Fri Oct 25 08:51:32 2019 +0000
基本的な部/組の操作: 名前付き引数を明示的に移譲する (#3)
Github Issue: #3
Ruby 2.7で名前付き引数を明示的に移譲するようにした。
:040000 040000 f952effe3541da2976ceb2ddb8c28ac49bb5376c d579cfe03dc6355ec11a3c976e7f95c4c837cd7a M lib
:040000 040000 55350251ef7c080f1d8ca983994268158bdbc2b1 22cf6f456f61d990cfea65cad9b1c3ddd76c8368 M test
bisect run success
物(オブジェクト)の操作(メソッド)は実際は核(Kernel)で定義されているので、日本語の別名も核(Kernel)で定義する。
irb(main):014:0> Object.public_instance_methods(false)
=> []
irb(main):015:0> pp Kernel.public_instance_methods(false) - Kernel.public_methods(false)
[:instance_variable_defined?,
:remove_instance_variable,
:instance_of?,
:kind_of?,
:is_a?,
:tap,
:instance_variable_get,
:instance_variable_set,
:instance_variables,
:protected_methods,
:private_methods,
:pretty_inspect,
:public_send,
:method,
:public_method,
:singleton_method,
:define_singleton_method,
:extend,
:to_enum,
:enum_for,
:=~,
:!~,
:eql?,
:respond_to?,
:object_id,
:send,
:display,
:class,
:nil?,
:hash,
:dup,
:singleton_class,
:clone,
:then,
:itself,
:yield_self,
:untaint,
:taint,
:tainted?,
:trust,
:untrust,
:untrusted?,
:singleton_methods,
:frozen?,
:methods,
:public_methods]
=> [:instance_variable_defined?, :remove_instance_variable, :instance_of?, :kind_of?, :is_a?, :tap, :instance_variable_get, :instance_variable_set, :instance_variables, :protected_methods, :private_methods, :pretty_inspect, :public_send, :method, :public_method, :singleton_method, :define_singleton_method, :extend, :to_enum, :enum_for, :=~, :!~, :eql?, :respond_to?, :object_id, :send, :display, :class, :nil?, :hash, :dup, :singleton_class, :clone, :then, :itself, :yield_self, :untaint, :taint, :tainted?, :trust, :untrust, :untrusted?, :singleton_methods, :frozen?, :methods, :public_methods]
irb(main):016:0>
admin@ad5e08f392fe:~/ruby-japanize$ ruby --version
ruby 2.7.0preview2 (2019-10-22 master 02aadf1032) [x86_64-linux]
admin@ad5e08f392fe:~/ruby-japanize$ rake test
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/num.rb:165: warning: constant Float::ROUNDS is deprecated
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/test/test_num.rb:185: warning: constant Float::ROUNDS is deprecated
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
Loaded suite /usr/local/lib/ruby/gems/2.7.0/gems/rake-13.0.0/lib/rake/rake_test_loader
Started
......................................................................................................................................................
......................................................................................................................................................
......................................................................................................................................................
......................................................................................................................................................
......................................................................................................................................................
......................................................................................................................................................
......................................................................................................................................................
......................................................................................................................................................
............................................................................/home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
../home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
../home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
../home/admin/ruby-japanize/lib/japanize/core.rb:124: warning: The last argument is used as the keyword parameter
/home/admin/ruby-japanize/lib/japanize/core.rb:158: warning: for method defined here
....................................................................
......................................................................................................................................................
......................................................................................................................................................
......................................................................................................................................................
..........................................................................................................
Finished in 0.562821874 seconds.
------------------------------------------------------------------------------------------------------------------------------------------------------
1906 tests, 5451 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
------------------------------------------------------------------------------------------------------------------------------------------------------
3386.51 tests/s, 9685.12 assertions/s
source_location
の日本語訳を直訳の元の場所
としているが、意味が不明瞭なので見直す。
より具体的に定義された場所
にした方が分かりやすいと思われる。
次の定数は環境に依存するため遅延アクセスにしていたが、使用可能なときだけ日本語名を定義するように変更する。
IO::SEEK_DATA
IO::SEEK_HOLE
File::Constants::RSYNC
File::Constants::SHARE_DELETE
NOFILE
の日本語訳をファイル数
としているのが曖昧。
clock_
は同期信号ではなく時計だと解釈する方が自然だと思われる。
Kernel#`
)を再定義して日本語の操作を定義する命令を追加する。例:
# 操作の定義
`定義 甲
何か
`
# 引数の転送
`定義 乙(...)
@別の物.乙(...)
`
# 末尾の引数の転送
`定義 不明な操作(名前, [...])
@別の物.__送信__(名前, [...])
`
Ruby 2.7.1で次の操作(メソッド)が新たに追加されたので、適切な日本語名称を考えて定義する。
参考情報:
ruby/ruby@7cfe93c
Ruby 2.7で次の組(クラス)が追加されたので、添付文書の組(クラス)の一覧に追加する。
Enumerator::Producer
NoMatchingPatternError
Ruby 2.7で次の類型適合(パターンマッチング)用に物(オブジェクト)を分解(deconstruct)する操作の英名を自動定義するようにしたので、添付文書の自動定義の一覧に追加する。
分解
→ deconstruct
キーで分解
→ deconstruct_keys
Math.ldexp(x, exp)
日本語の別名を二の冪乗
から二の冪乗の乗算
に修正する。
関数の戻り値が二の冪乗(2**exp
)ではなくx*(2**exp)
なので、名前が適切でなかったため見直す。
リリースv0.1.0の日本語化はhttps://docs.ruby-lang.org/ja/latest/doc/index.htmlを元にしたが、ここに列挙されてない操作(メソッド)があるようなので、洗い出して日本語化する。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.