Skip to content

Commit

Permalink
[ruby/win32ole] Reuse WIN32OLE_VERSION for gem version
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt authored and matzbot committed Apr 21, 2023
1 parent 9702a81 commit b9b43a1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ext/win32ole/win32ole.c
Expand Up @@ -27,7 +27,7 @@
const IID IID_IMultiLanguage2 = {0xDCCFC164, 0x2B38, 0x11d2, {0xB7, 0xEC, 0x00, 0xC0, 0x4F, 0x8F, 0x5D, 0x9A}};
#endif

#define WIN32OLE_VERSION "1.8.8"
#define WIN32OLE_VERSION "1.8.9"

typedef HRESULT (STDAPICALLTYPE FNCOCREATEINSTANCEEX)
(REFCLSID, IUnknown*, DWORD, COSERVERINFO*, DWORD, MULTI_QI*);
Expand Down
12 changes: 11 additions & 1 deletion ext/win32ole/win32ole.gemspec
@@ -1,6 +1,16 @@
source_version = ["", "ext/win32ole/"].find do |dir|
begin
break File.open(File.join(__dir__, "#{dir}win32ole.c")) {|f|
f.gets("\n#define WIN32OLE_VERSION ")
f.gets[/\s*"(.+)"/, 1]
}
rescue Errno::ENOENT
end
end

Gem::Specification.new do |spec|
spec.name = "win32ole"
spec.version = "1.8.9"
spec.version = source_version
spec.authors = ["Masaki Suketa"]
spec.email = ["suke@ruby-lang.org"]

Expand Down

0 comments on commit b9b43a1

Please sign in to comment.