diff options
author | Kazuhiro NISHIYAMA <zn@mbf.nifty.com> | 2020-09-30 15:55:07 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-11-12 21:45:13 +0900 |
commit | 939f641740ff66d62b3fcf7f798dfe997500e03e (patch) | |
tree | a40106a3612e123ce6eb10e8c4644b08ce4da794 | |
parent | cd2e02c2115a5c0e25eaf59db53333fa7a68fbf9 (diff) | |
download | json-939f641740ff66d62b3fcf7f798dfe997500e03e.tar.gz |
Remove unneeded `begin` and `end`
-rw-r--r-- | tests/json_common_interface_test.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/json_common_interface_test.rb b/tests/json_common_interface_test.rb index 68ad756..8cf74b4 100644 --- a/tests/json_common_interface_test.rb +++ b/tests/json_common_interface_test.rb @@ -160,12 +160,10 @@ class JSONCommonInterfaceTest < Test::Unit::TestCase def temp_file_containing(text, file_prefix = '') raise "This method must be called with a code block." unless block_given? - begin - Tempfile.create(file_prefix) do |file| - file << text - file.close - yield file.path - end + Tempfile.create(file_prefix) do |file| + file << text + file.close + yield file.path end end end |