Bug #12800
closedYAMLStoreTest#test_thread_safe hang
Description
lib/yaml/store.rb のテストがなかったので、test/test_pstore.rb を元に test/yaml/test_store.rb を作ってみたところ、YAMLStoreTest#test_thread_safe で止まってしまいました。
原因を調べてみたところ、
-
PStoreはdef initialize(file, thread_safe = false) -
YAML::Storeはdef initialize file_name, yaml_opts = {}
という違いがあるのに YAML::Store で (引数なしもかっこもない) super を呼び出していて、意図せず thread_safe が真になっているからだとわかりました。
r33376 での変更からのようで、yaml_opts も使われなくなっていたので、そのあたりも含めて直しておきます。
Updated by Anonymous about 9 years ago
- Status changed from Assigned to Closed
Applied in changeset r56291.
fix YAML::Store
-
lib/yaml/store.rb (YAML::Store#initialize): Fix arguments.
[ruby-dev:49821] [Bug #12800] -
test/yaml/test_store.rb: Add tests from test/test_pstore.rb.
-
test/yaml/test_store.rb (YAMLStoreTest#test_with_options): Add options test.
-
lib/yaml/store.rb (YAML::Store#dump): Revert to to_yaml.
-
lib/yaml/store.rb (YAML::Store#empty_marshal_data): Use to_yaml with options.
-
lib/yaml/store.rb (YAML::Store#empty_marshal_checksum): Use CHECKSUM_ALGO.
Updated by znz (Kazuhiro NISHIYAMA) about 9 years ago
- Description updated (diff)