summaryrefslogtreecommitdiff
path: root/test/win32ole/test_win32ole.rb
AgeCommit message (Collapse)Author
2024-03-23[ruby/win32ole] Test constants for the backward compatibilityNobuyoshi Nakada
https://github.com/ruby/win32ole/commit/22facf50fd
2024-01-28[ruby/win32ole] Use the scoped names in the testsNobuyoshi Nakada
https://github.com/ruby/win32ole/commit/2b91b6b838
2023-03-29[ruby/win32ole] Skip test failure with mswin platformHiroshi SHIBATA
https://github.com/ruby/win32ole/actions/runs/4507614838/jobs/7935550685?pr=18 https://github.com/ruby/win32ole/commit/39ae6c2bc7
2021-11-25[ruby/win32ole] Fix typos [ci skip]Nobuyoshi Nakada
https://github.com/ruby/win32ole/commit/8d46bd0c93 Notes: Merged: https://github.com/ruby/ruby/pull/5175
2019-11-18Warn on access/modify of $SAFE, and remove effects of modifying $SAFEJeremy Evans
This removes the security features added by $SAFE = 1, and warns for access or modification of $SAFE from Ruby-level, as well as warning when calling all public C functions related to $SAFE. This modifies some internal functions that took a safe level argument to no longer take the argument. rb_require_safe now warns, rb_require_string has been added as a version that takes a VALUE and does not warn. One public C function that still takes a safe level argument and that this doesn't warn for is rb_eval_cmd. We may want to consider adding an alternative method that does not take a safe level argument, and warn for rb_eval_cmd. Notes: Merged: https://github.com/ruby/ruby/pull/2476
2018-09-26* ext/win32ole/lib/win32ole.rb (methods): COM method elements should besuke
symbol in return value of methods. * test/win32ole/test_win32ole.rb ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-28`$SAFE` as a process global state. [Feature #14250]ko1
* vm_core.h (rb_vm_t): move `rb_execution_context_t::safe_level` to `rb_vm_t::safe_level_` because `$SAFE` is a process (VM) global state. * vm_core.h (rb_proc_t): remove `rb_proc_t::safe_level` because `Proc` objects don't need to keep `$SAFE` at the creation. Also make `is_from_method` and `is_lambda` as 1 bit fields. * cont.c (cont_restore_thread): no need to keep `$SAFE` for Continuation. * eval.c (ruby_cleanup): use `rb_set_safe_level_force()` instead of access `vm->safe_level_` directly. * eval_jump.c: End procs `END{}` doesn't keep `$SAFE`. * proc.c (proc_dup): removed and introduce `rb_proc_dup` in vm.c. * safe.c (rb_set_safe_level): don't check `$SAFE` 1 -> 0 changes. * safe.c (safe_setter): use `rb_set_safe_level()`. * thread.c (rb_thread_safe_level): `Thread#safe_level` returns `$SAFE`. It should be obsolete. * transcode.c (load_transcoder_entry): `rb_safe_level()` only returns 0 or 1 so that this check is not needed. * vm.c (vm_proc_create_from_captured): don't need to keep `$SAFE` for Proc. * vm.c (rb_proc_create): renamed to `proc_create`. * vm.c (rb_proc_dup): moved from proc.c. * vm.c (vm_invoke_proc): do not need to set and restore `$SAFE` for `Proc#call`. * vm_eval.c (rb_eval_cmd): rename a local variable to represent clearer meaning. * lib/drb/drb.rb: restore `$SAFE`. * lib/erb.rb: restore `$SAFE`, too. * test/lib/leakchecker.rb: check `$SAFE == 0` at the end of tests. * test/rubygems/test_gem.rb: do not set `$SAFE = 1`. * bootstraptest/test_proc.rb: catch up this change. * spec/ruby/optional/capi/string_spec.rb: ditto. * test/bigdecimal/test_bigdecimal.rb: ditto. * test/fiddle/test_func.rb: ditto. * test/fiddle/test_handle.rb: ditto. * test/net/imap/test_imap_response_parser.rb: ditto. * test/pathname/test_pathname.rb: ditto. * test/readline/test_readline.rb: ditto. * test/ruby/test_file.rb: ditto. * test/ruby/test_optimization.rb: ditto. * test/ruby/test_proc.rb: ditto. * test/ruby/test_require.rb: ditto. * test/ruby/test_thread.rb: ditto. * test/rubygems/test_gem_specification.rb: ditto. * test/test_tempfile.rb: ditto. * test/test_tmpdir.rb: ditto. * test/win32ole/test_win32ole.rb: ditto. * test/win32ole/test_win32ole_event.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-14Thread.current.report_on_exception = falseusa
* test/win32ole/test_win32ole.rb: set report_on_exception = false in threads which are expected to be throw some exceptions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-05ext/win32ole/lib/win32ole.rb (metods): rescue WIN32OLEQueryInterfaceError.suke
test/win32ole/test_win32ole.rb: add test for WIN32OLE#methods git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21ext/win32ole/win32ole.c (fole_missing): set receiver in NoMethodError.suke
test/win32ole/test_win32ole.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16Add frozen_string_literal: false for all filesnaruse
When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-13win32ole.c: check argument typenobu
* ext/win32ole/win32ole.c (ole_vstr2wc): check argument type, vstr must be a String here. reported by Marcin 'Icewall' Noga of Cisco Talos. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-25* ext/win32ole/win32ole.c(fole_s_connect, fole_initialize): raise asuke
security error with the tainted string object. * ext/win32ole/win32ole_event.c(ev_advise): ditto. * test/win32ole/test_win32ole.rb(test_s_new_exc_svr_tainted, test_s_new_exc_host_tainted): ditto. * test/win32ole/test_win32ole_event.rb(test_s_new_exc_tainted): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-02* test/win32ole: get rid of warnings (unused variable).usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-08win32ole.c: check aritynobu
* ext/win32ole/win32ole.c (fole_missing): should check actual argument count before accessing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-06* test/win32ole/test_win32ole.rb: follow other test files.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-06* test/win32ole/test_win32ole.rb: now source encoding is UTF-8, sousa
binary strings in old scripts are dangerous. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-04* test/win32ole/test_win32ole.rb (test_s_codepage_changed):suke
FileSystemObject only supports ANSI or UTF-16LE encoding. Patch by h.shirosaki (Hiroshi Shirosaki) [ruby-trunk - Bug #6650] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-28* test/win32ole/test_win32ole.rb (test_s_codepage_changed):luislavena
FileSystemObject only supports ANSI or UTF-16LE encoding. Patch by bosko (Bosko Ivanisevic) [ruby-trunk - Bug #6650] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-20* ext/win32ole/win32ole.c (ole_invoke): raise NoMethodErrorsuke
when COM method is not found. [ruby-core:30160] [Bug #3277] * test/win32ole/test_win32ole.rb (test_no_method_error): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-16* test/win32ole/test_win32ole.rb (test_s_codepage_changed,suke
test_s_locale_set, test_s_locale_change): skip test if Japanese locale is not installed. [ruby-core:23806] * test/win32ole/test_win32ole_variant.rb (test_conversion_str2cy): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06* {ext,lib,test}/**/*.rb: removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-06* ext/win32ole/win32ole.c (fole_s_connect, fole_initialize,suke
folevariant_initialize): check argument type of WIN32OLE.connect, WIN32OLE.new, WIN32OLE_VARIANT.new. * test/win32ole/test_win32ole.rb (test_s_new_exc, test_s_connect_exc): ditto. * test/win32ole/test_win32ole_variant.rb (test_s_new_exc): ditto. * test/win32ole/test_win32ole_method.rb: add assertion of WIN32OLE_METHOD.new. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-13* ext/win32ole/win32ole.c (load_conv_function51932): supportsuke
CP51932 on cygwin and mingw32. thanks to arton. * test/win32ole/test_win32ole.rb (test_cp51932): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-12* ext/win32ole/win32ole.c (set_ole_codepage, ole_cp2encoding,suke
ole_wc2mb, ole_vstr2wc, ole_mb2wc): support CP51932 (only mswin32). * test/win32ole/test_win32ole.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-27* ext/win32ole/win32ole.c (ole_invoke): WIN32OLE#[] and WIN32OLE#[]=suke
accepts number argument. * test/win32ole/test_win32ole.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-03* ext/win32ole/win32ole.c (hash2named_arg): refactoring.suke
* ext/win32ole/win32ole.c (ole_invoke, fole_respond_to, ev_on_event, fev_off_event): accepts Symbol argument. * test/win32ole/test_win32ole.rb: ditto. * test/win32ole/test_win32ole_event.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-05* ext/win32ole/win32ole.c: add WIN32OLE#ole_respond_to?suke
* test/win32ole/test_win32ole.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-27* ext/win32ole/win32ole.c : check String encoding whensuke
converting String to VT_BSTR in OLE. * test/win32ole/test_win32ole.rb : ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-16modify test according to changing WIN32OLE.codepage behavior.suke
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-15* ext/win32ole/win32ole.c (ole_init_cp): initialize WIN32OLE.codepagesuke
according to Encoding.default_external. * test/win32ole/test_win32ole.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-29* test/win32ole/test_win32ole.rb: ruby's encoding support.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-05* test/win32ole/test_win32ole.rb(test_s_codepage_changed) : modify testsuke
for m17n. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-05* test/win32ole/test_win32ole.rb(test_s_locale_change) :add assertion whichsuke
should raise WIN32OLERuntimeError. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-28* ext/win32ole/win32ole.c (ole_type_progid): progid getted bysuke
ProgIDFromCLSID should be freed by CoTaskMemFree. Thanks, arton. * test/win32ole/test_win32ole.rb (test_raise_message): set negative compareMode value to raise WIN32OLERuntimeError. * test/win32ole/test_win32ole_type.rb (test_implemented_ole_types): support some environment which returns IShellDispatch5 instead of IShellDispatch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-10* ext/win32ole/win32ole.c: add WIN32OLE#ole_query_interface.suke
thanks to Mikael Pahmp. * test/win32ole/test_win32ole.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-03* ext/win32ole/win32ole.c (ole_val2olevariantdata, ole_val2variant):suke
fix the bug of WIN32OLE_VARIANT.new when variant type is VT_ARRAY. * ext/win32ole/sample/excel1.rb: rewrite using WIN32OLE_VARIANT. * test/win32ole/test_win32ole.rb: add some test. * test/win32ole/test_win32ole_variant.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-29* ext/win32ole/win32ole.c: add WIN32OLE.locale=, WIN32OLE.locale,suke
WIN32OLE_VARIANT#vartype. * test/win32ole/test_win32ole.rb: add test for WIN32OLE.locale=, WIN32OLE.locale. * test/win32ole/test_win32ole_variant.rb: add test for WIN32OLE_VARIANT#vartype. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-20WIN32OLE.codepage= accepts installed codepage.suke
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-20modify WIN32OLERuntimeError message.suke
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-20move all test from ext/win32ole/tests test/win32olesuke
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-19move some test from ext/win32ole/tests to test/win32olesuke
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-07add some test. update comment for rdoc.suke
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-19accept hash argument of Symbol key.suke
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e