summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazuhiro NISHIYAMA <zn@mbf.nifty.com>2020-09-30 15:55:07 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-11-12 21:45:13 +0900
commit939f641740ff66d62b3fcf7f798dfe997500e03e (patch)
treea40106a3612e123ce6eb10e8c4644b08ce4da794
parentcd2e02c2115a5c0e25eaf59db53333fa7a68fbf9 (diff)
downloadjson-939f641740ff66d62b3fcf7f798dfe997500e03e.tar.gz
Remove unneeded `begin` and `end`
-rw-r--r--tests/json_common_interface_test.rb10
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