Commit graph

7522 commits

Author SHA1 Message Date
pavel
31419f46fc [ruby/fcntl] add F_GETPIPE_SZ and F_SETPIPE_SZ
39e0faedc5
2020-06-09 21:13:34 +09:00
Hiroshi SHIBATA
bee63ab97a
[ruby/fcntl] Use Gemfile instead of Gem::Specification#add_development_dependency. 2020-06-09 21:11:32 +09:00
dsisnero
28f4b5af45 [ruby/dbm] Update dbm.gemspec
25a6f365bb
2020-06-09 20:56:15 +09:00
Yusuke Endoh
a3cc9b3c8e Avoid requiring "psych/versions"
This leads to double requiring "ext/psych/lib/psych/versions.rb" and
".ext/common/psych/versions.rb", which produces doxens of warnings
during `make test-all`.

20200608T123004Z.log.html.gz
```
[15092/20234]
TestRDocOptions#test_init_with_encoding/home/chkbuild/chkbuild/tmp/build/20200608T123004Z/ruby/ext/psych/lib/psych.rb:233: warning: already initialized constant Psych::LIBYAML_VERSION
/home/chkbuild/chkbuild/tmp/build/20200608T123004Z/ruby/.ext/common/psych.rb:233: warning: previous definition of LIBYAML_VERSION was here
/home/chkbuild/chkbuild/tmp/build/20200608T123004Z/ruby/ext/psych/lib/psych.rb:235: warning: already initialized constant Psych::NOT_GIVEN
/home/chkbuild/chkbuild/tmp/build/20200608T123004Z/ruby/.ext/common/psych.rb:235: warning: previous definition of NOT_GIVEN was here
/home/chkbuild/chkbuild/tmp/build/20200608T123004Z/ruby/ext/psych/lib/psych.rb:271: warning: method redefined; discarding old load
/home/chkbuild/chkbuild/tmp/build/20200608T123004Z/ruby/.ext/common/psych.rb:271: warning: previous definition of load was here
...
```

The same issue happened in fiddle.gemspec, and this change applies the
same fix as [fiddle](https://github.com/ruby/fiddle/issues/34).
2020-06-09 00:27:04 +09:00
Po-Chuan Hsieh
6b9e363aa0 [ruby/psych] Add LICENSE to the gem
02919596fa
2020-06-05 11:49:56 +09:00
David Rodríguez
cd3d035e8a [ruby/psych] Remove unnecessary version guard from versions.rb
Removing it triggers the following warnings when running `bundle` under
jruby from the root of the `psych` repo prints the following warnings:

```
/path/to/jruby-9.2.9.0/lib/ruby/gems/shared/gems/psych-3.1.0-java/lib/psych/versions.rb:7: warning: already initialized constant VERSION
/path/to//jruby-9.2.9.0/lib/ruby/gems/shared/gems/psych-3.1.0-java/lib/psych/versions.rb:10: warning: already initialized constant DEFAULT_SNAKEYAML_VERSION
```

This is because bundler loads the versions file relatively from the
local gemspec, and then internally loads the psych gem, causing the
redefinition warnings.

Instead, we modify the $LOAD_PATH so that when working locally on the
`psych` repo, the local version of `psych` gets used.

a3fc8191a7
2020-06-05 11:49:56 +09:00
Mark Thorn
f245976386 [ruby/psych] Fix ArgumentError with leading and trailing underscores in number strings.
ac2d2c9b1b
2020-06-05 11:49:56 +09:00
David Rodríguez
5ed58b90d1 [ruby/psych] Fix gem installation
Current version is not installable because the gemspec is invalid, since
it includes a `.travis.yml` file that no longer exists, so `rake
install` fails like this:

```
$ rake install
rake aborted!
WARNING:  See https://guides.rubygems.org/specification-reference/ for help
ERROR:  While executing gem ... (Gem::InvalidSpecificationException)
    [".travis.yml"] are not files
```

32b18ca7ca
2020-06-05 11:49:56 +09:00
Jean Boussier
f641d78a6f [ruby/psych] Implement freeze option for Pysch.load
7dae24894d
2020-06-05 11:49:56 +09:00
Jean Boussier
4085c51a51 [ruby/psych] Implement a freeze load option
04f97f7a56
2020-06-05 11:49:56 +09:00
Jean Boussier
591a3326e3 [ruby/psych] Refactor symbolize_names
3e472ab2d7
2020-06-05 11:49:56 +09:00
Nobuyoshi Nakada
d32e2bb02d
Allow references to $$ in Ripper DSL 2020-05-29 09:41:27 +09:00
Nobuyoshi Nakada
6dbc3a2871
autoconf may not be available 2020-05-27 23:46:55 +09:00
Nobuyoshi Nakada
135c6a4b99
fiddle: need to update configure after updating config tools 2020-05-27 00:30:59 +09:00
Nobuyoshi Nakada
5917fe2303
_GNU_SOURCE is needed for mkostemp on Cygwin 2020-05-26 19:17:47 +09:00
Yusuke Endoh
f27e0d90c8 ext/fiddle/fiddle.gemspec: avoid require lib/fiddle/version.rb
It loads `ext/fiddle/lib/fiddle/version.rb`, which causes constant
redefinition warning:

20200523T153003Z.log.html.gz
```
[ 6317/20193] TestDefaultGems#test_validate_gemspec/home/chkbuild/chkbuild/tmp/build/20200523T153003Z/ruby/ext/fiddle/lib/fiddle/version.rb:2: warning: already initialized constant Fiddle::VERSION
/home/chkbuild/chkbuild/tmp/build/20200523T153003Z/ruby/.ext/common/fiddle/version.rb:2: warning: previous definition of VERSION was here
 = 0.16 s
```

This changeset read the version by manual parsing hack which is also
used in stringio and zlib.
2020-05-24 04:01:20 +09:00
Chris Seaton
3015a7aae7 [ruby/fiddle] Improve documentation on how to correctly free memory and free memory in tests (#33)
e59cfd708a
2020-05-23 14:34:07 +09:00
Sutou Kouhei
24b615e82e [ruby/fiddle] Export Fiddle::VERSION
1b93a2d9db
2020-05-23 14:29:16 +09:00
Sutou Kouhei
74a4558c14 [ruby/fiddle] Update file list
b04cb92d7b
2020-05-23 14:29:16 +09:00
Sutou Kouhei
d5c0018a9a [ruby/fiddle] Fix a typo
445ca6b501
2020-05-23 14:29:16 +09:00
Sutou Kouhei
a0dcdd64c5 [ruby/fiddle] Bump version
f8fb7c4823
2020-05-23 14:29:16 +09:00
Sutou Kouhei
13f64333ea [ruby/fiddle] Add Fiddle::VERSION
9dcf64c096
2020-05-23 14:29:16 +09:00
Sutou Kouhei
5fb7ca33e6 [ruby/fiddle] Add missing spec.extensions
2ce36b1fdc
2020-05-23 14:29:16 +09:00
sinisterchipmunk
77cc13943c [ruby/fiddle] Fix assignment to array within struct (#26)
* Allow access to a struct's underlying memory with `struct[offset, length]`.

24083690a6
2020-05-23 14:29:16 +09:00
sinisterchipmunk
4a835621ce [ruby/fiddle] Make array access override compatible with base class (#25)
* 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


c082c81bb5
2020-05-23 14:29:16 +09:00
sinisterchipmunk
aa1d3c7d2c [ruby/fiddle] Initialize memory to 0 when calling Fiddle.malloc(). (#24)
8414239ca3
2020-05-23 14:29:16 +09:00
Kenta Murata
f4f157fc81
Suppress warnings no inline ruby debug (#3107)
* Suppress unused warnings occurred due to -fno-inline

* Suppress warning occurred due to RUBY_DEBUG=1
2020-05-22 13:49:08 +09:00
Samuel Williams
0e3b0fcdba
Thread scheduler for light weight concurrency. 2020-05-14 22:10:55 +12:00
Yusuke Endoh
8bd27c547c ext/json/parser/prereq.mk: remove type-limit warning if char is unsigned
Ragel generates a code `0 <= (*p)` where `*p` is char.
As char is unsigned by default on arm and RISC-V, it is warned by gcc:

```
compiling parser.c
parser.c: In function ‘JSON_parse_string’:
parser.c:1566:2: warning: comparison is always true due to limited range of data type [-Wtype-limits]
  if ( 0 <= (*p) && (*p) <= 31 )
  ^
parser.c:1596:2: warning: comparison is always true due to limited range of data type [-Wtype-limits]
  if ( 0 <= (*p) && (*p) <= 31 )
  ^
```

This change removes the warning by substituting the condition with
`0 <= (signed char)(*p)`.
2020-05-14 00:44:35 +09:00
Kazuki Yamaguchi
87662134b5 [ruby/openssl] Ruby/OpenSSL 2.2.0
41587f69e1
2020-05-13 15:47:51 +09:00
Kazuki Yamaguchi
cc26638cae [ruby/openssl] ssl: temporarily remove SSLContext#add_certificate_chain_file
Let's revert the changes for now, as it cannot be included in the 2.2.0
release.

My comment on #257:

> A blocker is OpenSSL::SSL::SSLContext#add_certificate_chain_file. It
> has a pending change and I don't want to include it in an incomplete
> state.
>
> The initial implementation in commit 46e4bdba40c5 was not really
> useful. The issue is described in #305. #309 extended it
> to take the corresponding private key together. However, the new
> implementation was incompatible on Windows and was reverted by #320 to
> the initial one.
>
> (The prerequisite to implement it in) an alternative way is #288, and
> it's still cooking.

This effectively reverts the following commits:

 - dacd08937ccd ("ssl: suppress test failure with SSLContext#add_certificate_chain_file", 2020-03-09)
 - 46e4bdba40c5 ("Add support for SSL_CTX_use_certificate_chain_file. Fixes #254.", 2019-06-13)

ea925619a9
2020-05-13 15:47:51 +09:00
Kazuki Yamaguchi
6f008c9d2f [ruby/openssl] pkey: add PKey#inspect and #oid
Implement OpenSSL::PKey::PKey#oid as a wrapper around EVP_PKEY_id().
This allows user code to check the type of a PKey object.

EVP_PKEY can have a pkey type for which we do not provide a dedicated
subclass. In other words, an EVP_PKEY that is not any of {RSA,DSA,DH,EC}
can exist. It is currently not possible to distinguish such a pkey.

Also, implement PKey#inspect to include the key type for convenience.

dafbb1b3e6
2020-05-13 15:47:51 +09:00
Bart de Water
a7145c3de4 [ruby/openssl] Fix signing example to not use Digest instance
033fb4fbe4
2020-05-13 15:47:51 +09:00
Bart de Water
c85789f9b2 [ruby/openssl] Look up cipher by name instead of constant
b08ae7e73d
2020-05-13 15:47:51 +09:00
Bart de Water
b44cc9f040 [ruby/openssl] Remove 'mapping between Digest class and sn/ln'
This is not present in the referenced files anymore, and not useful to most users

eae30d2b96
2020-05-13 15:47:51 +09:00
Bart de Water
0b2c70eaa1 [ruby/openssl] Look up digest by name instead of constant
b28fb2f05c
2020-05-13 15:47:51 +09:00
Bart de Water
3f8665fe0e [ruby/openssl] Add Marshal support to PKey objects
c4374ff041
2020-05-13 15:47:51 +09:00
Yusuke Endoh
61d451d6ce ext/bigdecimal/bigdecimal.c, ext/date/date_core.c: undef NDEBUG
`#define NDEBUG` produces "macro redefined" warnings when it is already
defined via cppflags
2020-05-13 13:49:21 +09:00
Yusuke Endoh
3bca1b6aad ext/openssl/ossl.h: Remove a variable that is used only in assert
It produces "unused variable" warnings in NDEBUG mode
2020-05-13 13:45:31 +09:00
Yusuke Endoh
b68dab8667 ext/fiddle/extconf.rb: Fix the condition of libffi <= 3.1
ver is [3, 1, 0] which is not less then or equal to [3, 1]
2020-05-13 10:57:14 +09:00
Yusuke Endoh
9cfa811b0f Do not try ffi_closure_alloc if libffi is <= 3.1
Maybe due to e1855100e4, CentOS, RHEL, and
Fedora CIs have started failing with SEGV.  Try to avoid
ffi_closure_alloc on those environments.

20200512T183004Z.fail.html.gz
20200512T183004Z.fail.html.gz
20200512T183003Z.fail.html.gz
2020-05-13 08:42:48 +09:00
Yusuke Endoh
e1855100e4 ext/fiddle/extconf.rb: check if ffi_closure_alloc is available
to define HAVE_FFI_CLOSURE_ALLOC.
The macro is used in closure.c, so have_func check is needed.

If pkg-config is not installed, extconf.rb fails to detect the version
of libffi, and does not add "-DUSE_FFI_CLOSURE_ALLOC=1" even when system
libffi version is >= 3.2.

If USE_FFI_CLOSURE_ALLOC is not defined, closure.c attempts to check if
HAVE_FFI_CLOSURE_ALLOC is defined or not, but have_func was removed with
528a3a1797, so the macro is always not
defined.

This resulted in this deprecation warning:

20200512T123003Z.log.html.gz
```
compiling closure.c
closure.c: In function 'initialize':
closure.c:265:5: warning: 'ffi_prep_closure' is deprecated: use ffi_prep_closure_loc instead [-Wdeprecated-declarations]
  265 |     result = ffi_prep_closure(pcl, cif, callback, (void *)self);
      |     ^~~~~~
In file included from ./fiddle.h:42,
                 from closure.c:1:
/usr/include/x86_64-linux-gnu/ffi.h:334:1: note: declared here
  334 | ffi_prep_closure (ffi_closure*,
      | ^~~~~~~~~~~~~~~~
```
2020-05-13 01:17:30 +09:00
Nobuyoshi Nakada
317fdd6df2 fiddle: share the same config tools 2020-05-12 15:57:47 +09:00
Nobuyoshi Nakada
d1748484e8 extlibs.rb: added variable references
Reduce duplicate parts such as package name and version numbers.
2020-05-12 15:57:47 +09:00
卜部昌平
9e41a75255 sed -i 's|ruby/impl|ruby/internal|'
To fix build failures.
2020-05-11 09:24:08 +09:00
卜部昌平
d7f4d732c1 sed -i s|ruby/3|ruby/impl|g
This shall fix compile errors.
2020-05-11 09:24:08 +09:00
Nobuyoshi Nakada
f169931414
win32ole: separate global variable declarations and definitions
https://gcc.gnu.org/gcc-10/changes.html#c

> * GCC now defaults to `-fno-common`.  As a result, global
>   variable accesses are more efficient on various targets.  In
>   C, global variables with multiple tentative definitions now
>   result in linker errors.  With `-fcommon` such definitions are
>   silently merged during linking.
2020-05-10 21:37:59 +09:00
Nobuyoshi Nakada
be575a6eef
[ruby/io-console] Use sys_fail_fptr macro
2b8ba023c8
2020-05-09 17:05:14 +09:00
Nobuyoshi Nakada
0ce45db115 [ruby/io-console] Show path name at error
6a4b1c1a6d
2020-05-09 13:56:55 +09:00
Kazuki Tsujimoto
6ed7bc83ec
Fix indentation 2020-05-04 13:27:25 +09:00