diff --git a/lib/roo/base.rb b/lib/roo/base.rb index e6f3bddb..1d91d9cb 100644 --- a/lib/roo/base.rb +++ b/lib/roo/base.rb @@ -314,7 +314,7 @@ def method_missing(m, *args) # access different worksheets by calling spreadsheet.sheet(1) # or spreadsheet.sheet('SHEETNAME') def sheet(index, name = false) - default_sheet = String === index ? index : sheets[index] + self.default_sheet = String === index ? index : sheets[index] name ? [default_sheet, self] : self end