Skip to content

Commit bff3ea8

Browse files
committed
Reuse WIN32OLE_VERSION for gem version
1 parent c13305f commit bff3ea8

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

ext/win32ole/win32ole.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
const IID IID_IMultiLanguage2 = {0xDCCFC164, 0x2B38, 0x11d2, {0xB7, 0xEC, 0x00, 0xC0, 0x4F, 0x8F, 0x5D, 0x9A}};
2828
#endif
2929

30-
#define WIN32OLE_VERSION "1.8.8"
30+
#define WIN32OLE_VERSION "1.8.9"
3131

3232
typedef HRESULT (STDAPICALLTYPE FNCOCREATEINSTANCEEX)
3333
(REFCLSID, IUnknown*, DWORD, COSERVERINFO*, DWORD, MULTI_QI*);

win32ole.gemspec

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1+
source_version = ["", "ext/win32ole/"].find do |dir|
2+
begin
3+
break File.open(File.join(__dir__, "#{dir}win32ole.c")) {|f|
4+
f.gets("\n#define WIN32OLE_VERSION ")
5+
f.gets[/\s*"(.+)"/, 1]
6+
}
7+
rescue Errno::ENOENT
8+
end
9+
end
10+
111
Gem::Specification.new do |spec|
212
spec.name = "win32ole"
3-
spec.version = "1.8.9"
13+
spec.version = source_version
414
spec.authors = ["Masaki Suketa"]
515
spec.email = ["suke@ruby-lang.org"]
616

0 commit comments

Comments
 (0)