Project

General

Profile

Bug #12800

YAMLStoreTest#test_thread_safe hang

Added by znz (Kazuhiro NISHIYAMA) over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
[ruby-dev:49821]

Description

lib/yaml/store.rb のテストがなかったので、test/test_pstore.rb を元に test/yaml/test_store.rb を作ってみたところ、YAMLStoreTest#test_thread_safe で止まってしまいました。

原因を調べてみたところ、

  • PStoredef initialize(file, thread_safe = false)
  • YAML::Storedef initialize file_name, yaml_opts = {}

という違いがあるのに YAML::Store で (引数なしもかっこもない) super を呼び出していて、意図せず thread_safe が真になっているからだとわかりました。

r33376 での変更からのようで、yaml_opts も使われなくなっていたので、そのあたりも含めて直しておきます。

Associated revisions

Revision 158cf62b
Added by znz (Kazuhiro NISHIYAMA) over 2 years ago

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.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 56291
Added by znz (Kazuhiro NISHIYAMA) over 2 years ago

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.

Revision 56291
Added by kazu over 2 years ago

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.

Revision 56291
Added by kazu over 2 years ago

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.

Revision 56291
Added by kazu over 2 years ago

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.

History

#1

Updated by Anonymous over 2 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) over 2 years ago

  • Description updated (diff)

Also available in: Atom PDF