Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIN32OLE.const_load should accept a string as its first argument for compatibility #6

Open
johndouthat opened this issue Feb 2, 2012 · 0 comments

Comments

@johndouthat
Copy link

require 'win32ole'
module Constants
end
WIN32OLE.const_load("Microsoft Excel 12.0 Object Library", Constants)

Expected behavior: Some constants should be loaded into the Constants module, according to MRI's win32ole behavior.
Actual behavior: NoMethodError: undefined method type_info' for "Microsoft Excel 12.0 Object Library"`

According to http://ruby-doc.org/stdlib-1.9.3/libdoc/win32ole/rdoc/WIN32OLE.html#method-c-const_load,

The first argument is WIN32OLE object or type library name.

MRI checks the class of the first argument here https://github.com/ruby/ruby/blob/trunk/ext/win32ole/win32ole.c#L2817

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant