summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-04 00:13:18 +0000
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-04 00:13:18 +0000
commitb4e9ffbdc8cf4d448e86cf6e9c4a2ce8dbf52e29 (patch)
tree09674172f58f89b83b5b40b6d2e8d1c8cab0cbb8
parent34fcb5dbee90f990fe1a08e829974caa2b1b8195 (diff)
* ext/win32ole/sample/example*.rb: Add wait input to quit for examples
with patch provided by @windwiny [Fixes GH-705] https://github.com/ruby/ruby/pull/705 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--ext/win32ole/sample/excel1.rb5
-rw-r--r--ext/win32ole/sample/excel2.rb3
-rw-r--r--ext/win32ole/sample/excel3.rb7
4 files changed, 20 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1a98a378b5a..1ad293bd0db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sat Oct 4 09:12:03 2014 Zachary Scott <e@zzak.io>
+
+ * ext/win32ole/sample/example*.rb: Add wait input to quit for examples
+ with patch provided by @windwiny [Fixes GH-705]
+ https://github.com/ruby/ruby/pull/705
+
Sat Oct 4 09:08:18 2014 Zachary Scott <e@zzak.io>
* ext/win32ole/win32ole.c: [DOC] Fix typo in :nodoc: reported by
diff --git a/ext/win32ole/sample/excel1.rb b/ext/win32ole/sample/excel1.rb
index c8cd38e7328..7136c938a3e 100644
--- a/ext/win32ole/sample/excel1.rb
+++ b/ext/win32ole/sample/excel1.rb
@@ -27,7 +27,10 @@ range.Select
chart = workbook.Charts.Add;
workbook.saved = TRUE;
-sleep 0.5
+
+print "Now quit Excel... Please enter."
+gets
+
application.ActiveWorkbook.Close(0);
application.Quit();
diff --git a/ext/win32ole/sample/excel2.rb b/ext/win32ole/sample/excel2.rb
index 95af61ceb6a..632882636a7 100644
--- a/ext/win32ole/sample/excel2.rb
+++ b/ext/win32ole/sample/excel2.rb
@@ -23,5 +23,8 @@ i.step(180, 10) do |rot|
end
# Done, bye
+print "Now quit Excel... Please enter."
+gets
+
excel.ActiveWorkbook.Close(0);
excel.Quit();
diff --git a/ext/win32ole/sample/excel3.rb b/ext/win32ole/sample/excel3.rb
index 0f967170639..1ace478007d 100644
--- a/ext/win32ole/sample/excel3.rb
+++ b/ext/win32ole/sample/excel3.rb
@@ -11,3 +11,10 @@ puts "The number of sheets is #{sheetS.count}"
puts "Now add 2 sheets after of `#{sheet.name}`"
sheetS.add({'count'=>2, 'after'=>sheet})
puts "The number of sheets is #{sheetS.count}"
+
+print "Now quit Excel... Please enter."
+gets
+
+application.ActiveWorkbook.Close(0);
+application.Quit();
+