mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Remove unneeded begin
and end
This commit is contained in:
parent
30bb040ea4
commit
ce986b41ca
1 changed files with 4 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue