summaryrefslogtreecommitdiff
path: root/test/json/json_common_interface_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/json/json_common_interface_test.rb')
-rw-r--r--test/json/json_common_interface_test.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/json/json_common_interface_test.rb b/test/json/json_common_interface_test.rb
index f87eab0e9c..9148b78c8b 100644
--- a/test/json/json_common_interface_test.rb
+++ b/test/json/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