I don't use tool/sync_default_gem.rb because the last sync was incomplete.
Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org>
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
Co-authored-by: sinisterchipmunk <sinisterchipmunk@gmail.com>
Co-authored-by: Sutou Kouhei <kou@clear-code.com>
Add rb_fiddle_ prefix to conversion functions.h to keep backward
compatibility but value_to_generic() isn't safe for TYPE_CONST_STRING
and not String src. Use rb_fiddle_value_to_generic() instead.
https://github.com/ruby/fiddle/commit/0ffcaa39e5
* Allow access to a struct's underlying memory with `struct[offset, length]`.
* Make accessing a struct's underlying memory more convenient.
* refactor memory access unit tests for improved clarity
https://github.com/ruby/fiddle/commit/c082c81bb5
* Fix a failing test
This commit fixes the following failure:
```
1) Failure:
Fiddle::TestImport#test_no_message_with_debug [/Users/mrkn/src/github.com/ruby/fiddle/test/fiddle/test_import.rb:152]:
1. [2/2] Assertion for "stderr"
| <[]> expected but was
| <["Exception `NameError' at /Users/mrkn/.rbenv/versions/2.5.1/lib/ruby/2.5.0/fiddle/import.rb:157 - uninitialized constant Fiddle::Function::STDCALL"]>.
```
* Stop using Bundler.with_clean_env
* Clear existing Ruby environment variables on test_no_message_with_debug
https://github.com/ruby/fiddle/commit/13133ddec8
so SIZEOF_LONG_LONG is not always available.
We have to check its defined?-ness before using.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/fiddle/test_func.rb (test_string): this test break String buffer
by `strcpy` ("000" -> "123"). However, the string literal "000" with
`frozen_string_literal: true` returns a string object from frozen
string pool. So that after this test "000" from fstring pool becomes
"123" (modified string). 'test/date/' uses "000" (as fstring) and tests
are fails (we could check with `make test-all TESTS='fiddle date'`).
* test/fiddle/test_function.rb: ditto.
* test/fiddle/test_import.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
tests of fiddle already used customized assertions of ruby core.
* test/fiddle/helper.rb: Use Test::Unit::TestCase for base class of
testcase.
* test/fiddle/test_*.rb: Use assert_raise instead of assert_raises.
Remove needless includes for Test::Unit::Assertions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/fiddle/test_import.rb (LIBC.fprintf): VC14's `fprintf` is very distinct
name, then, just ignore this test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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
test/fiddle/test_c_union_entity.rb,
test/fiddle/test_cparser.rb, test/fiddle/test_func.rb,
test/fiddle/test_handle.rb, test/fiddle/test_import.rb,
test/fiddle/test_pointer.rb: don't run test if the system
don't support fiddle.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
CPtr -> Pointer.
* test/fiddle/test_import.rb (Fiddle::TestImport#test_sizeof):
Added the test for the above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e