Commit graph

7414 commits

Author SHA1 Message Date
Alan Wu
9c5a2fed85 Fix readline build dependency 2020-02-09 11:27:32 -05:00
aycabta
f3471174bb [ruby/readline-ext] Use rake/extensiokntask to build
b0b5f709bd
2020-02-09 20:22:12 +09:00
aycabta
108a288079 [ruby/readline-ext] Add spec.extensions
8c33abb13c
2020-02-09 20:22:12 +09:00
aycabta
a629f147cd [ruby/readline-ext] The ruby/assert.h is adopted by Ruby 2.7 or later
106c31fc1b
2020-02-09 20:22:12 +09:00
aycabta
05711adfb4 [ruby/readline-ext] Remove unnecessary -I$(top_srcdir) when it's an individual gem
efaca4a5f4
2020-02-09 20:22:12 +09:00
aycabta
9dcb324fbe Revert "[ruby/readline-ext] Include ruby/assert.h in ruby/ruby.h so that assertions can be there"
This reverts commit 425b2064d3.

This cherry-pick was a mistake.
2020-02-09 20:22:12 +09:00
卜部昌平
115fec062c more on NULL versus functions.
Function pointers are not void*.  See also
ce4ea956d2
8427fca49b
2020-02-07 14:24:19 +09:00
Kazuhiro NISHIYAMA
3c7a09ece8
Add call-seq to Pathname#open from File.open
before:
```
  open(p1 = v1, p2 = v2, p3 = v3)
```
2020-02-04 20:56:13 +09:00
Mikhail Novosyolov
7c165bd7d9 Fix linkage of popen_deadlock test
DEBUG: BUILDSTDERR: /usr/bin/ld: infinite_loop_dlsym.o: in function `native_loop_dlsym':
DEBUG: BUILDSTDERR: /builddir/build/BUILD/ruby-2.7.0/ext/-test-/popen_deadlock/infinite_loop_dlsym.c:16: undefined reference to `dlsym'
DEBUG: BUILDSTDERR: collect2: error: ld returned 1 exit status

Ruby was built with LibreSSL.
2020-02-04 08:04:13 +09:00
卜部昌平
7cff2f4585 fix delete unnecessary return
Was my mistake to put return here.
2020-02-01 14:02:59 +09:00
卜部昌平
cdd75d4e7f support C++ std::nullptr_t
C++ keyword `nullptr` represents a null pointer (note also that NULL is
an integer in C++ due to its design flaw).  Its type is `std::nullptr_t`,
defined in <cstddef> standard header.  Why not support it when the
backend implementation can take a null pointer as an argument.
2020-01-31 13:01:52 +09:00
Nobuyoshi Nakada
4942adf68c
Return the makefile content
Block for `create_makefile` is expected to return the content of
the makefile.
2020-01-31 12:52:22 +09:00
NARUSE, Yui
ca2888fb3d Move .IGNORE in extconf.rb 2020-01-31 08:00:56 +09:00
NARUSE, Yui
9aed421d70 Support nmake 2020-01-31 06:47:55 +09:00
NARUSE, Yui
53adb53c9a Ignore expected errors on compiling C++ source [Bug #16331]
BSD make can run parallel more aggressively than GNU make. It communicate
with other make process through -J option in MAKEFLAGS environment variable
to notify a build failure happend in an other pararell make process.
https://www.freebsd.org/cgi/man.cgi?make

It usually works well but ext/-test-/cxxanyargs/Makefile has two targets
which are expected to fail (failure.o and failurem1.o).

Additional note:
To test and debug this issue, following command will speed up it.
`make -f exts.mk -j8 clean all`
2020-01-31 03:05:51 +09:00
卜部昌平
83d6487ae5 fix rb_define_global_function to take const VALUE*
It was unable for rb_define_global_function to take VALUE(*)(int argc,
const VLAUE *argv, VALUE self) -style function.  Test added.
2020-01-28 17:29:57 +09:00
卜部昌平
bbe3420cce add test for rb_define_global_function
was missing.
2020-01-28 17:09:42 +09:00
卜部昌平
16592d6b69 add test for rb_define_method_id
was missing.
2020-01-28 17:09:42 +09:00
卜部昌平
3c3eb418f9 improved support for rb_f_notimplement
rb_f_notimplement should be accepted for all possible arities.

Test provided for that.
2020-01-28 17:09:42 +09:00
Nobuyoshi Nakada
27ac1c615d
Revert pathname, rb_warn_deprecated* are not public API 2020-01-23 21:49:58 +09:00
Nobuyoshi Nakada
aefb13eb63
Added rb_warn_deprecated_to_remove
Warn the deprecation and future removal, with obeying the warning
flag.
2020-01-23 21:42:15 +09:00
Nobuyoshi Nakada
425b2064d3 [ruby/readline-ext] Include ruby/assert.h in ruby/ruby.h so that assertions can be there
4d44c12832
2020-01-23 13:31:19 +09:00
Jeremy Evans
e18b817b1f Make taint warnings non-verbose instead of verbose 2020-01-22 11:19:13 -08:00
Kazuhiro NISHIYAMA
c90fc55a1f Drop executable bit of *.{yml,h,mk.tmpl} 2020-01-22 16:04:38 +09:00
Jeremy Evans
9f99760daf
Get rid of use of special variables
Use `"\n"` and `IO#fileno` instead of `$/` and `$.` respectively.
[Feature #14240]
2020-01-20 16:58:58 +09:00
Nobuyoshi Nakada
199d829a51
[ruby/io-console] bump up to 0.5.5 2020-01-18 00:17:05 +09:00
Nobuyoshi Nakada
4e56ec4ef7 [ruby/io-console] Set OPOST when intr is true
To enable implementation-defined output processing, for the
compatibility with readline.  [Bug #16509]

https://bugs.ruby-lang.org/issues/16509

8c8b0b6757
2020-01-18 00:15:02 +09:00
Hiroshi SHIBATA
4e1a7678cd [ruby/io-console] Update the minimum requirement of Ruby version
73e7b6318a
2020-01-18 00:14:58 +09:00
Nobuyoshi Nakada
f9788ca7fe
Update dependencies
internal/rational.h needs internal/warnings.h with Apple clang,
for `UNALIGNED_MEMBER_ACCESS`.
2020-01-17 16:41:46 +09:00
Kazuhiro NISHIYAMA
4e6bcac23e
Update dependencies in makefiles again
patch from 638231960
2020-01-17 11:19:01 +09:00
Kenta Murata
47465ab1cc
rb_rational_raw: make a denominator always positive 2020-01-17 10:57:21 +09:00
Kazuhiro NISHIYAMA
73618d84e8
Update dependencies in makefiles
patch from 638226493
2020-01-17 10:25:00 +09:00
zverok
7f1e3a7b7c [flori/json] Add :nodoc: for GeneratorMethods
2f3f44c180
2020-01-06 15:13:50 +09:00
zverok
41ef6df8c9 [flori/json] Fix examples syntax
3845491d92
2020-01-06 15:13:35 +09:00
zverok
2e5ef30cb9 [flori/json] Enchance generic JSON and #generate docs
4ede0a7d19
2020-01-06 15:13:15 +09:00
Jeremy Evans
1658e6b5db
[flori/json] Remove invalid JSON.generate description from JSON module rdoc
This text used to be true in older versions of json, but has not
been true for a number of years (since json version 2 I think).

373b633f38
2020-01-06 15:09:55 +09:00
Jeremy Evans
beae6cbf0f Fully separate positional arguments and keyword arguments
This removes the warnings added in 2.7, and changes the behavior
so that a final positional hash is not treated as keywords or
vice-versa.

To handle the arg_setup_block splat case correctly with keyword
arguments, we need to check if we are taking a keyword hash.
That case didn't have a test, but it affects real-world code,
so add a test for it.

This removes rb_empty_keyword_given_p() and related code, as
that is not needed in Ruby 3.  The empty keyword case is the
same as the no keyword case in Ruby 3.

This changes rb_scan_args to implement keyword argument
separation for C functions when the : character is used.
For backwards compatibility, it returns a duped hash.
This is a bad idea for performance, but not duping the hash
breaks at least Enumerator::ArithmeticSequence#inspect.

Instead of having RB_PASS_CALLED_KEYWORDS be a number,
simplify the code by just making it be rb_keyword_given_p().
2020-01-02 18:40:45 -08:00
Nobuyoshi Nakada
179e402d8a
Updated dependencies on internal/warnings.h
Needed for `UNALIGNED_MEMBER_ACCESS` using `COMPILER_WARNING_`*
macros.
2019-12-31 11:14:19 +09:00
Nobuyoshi Nakada
3e2418e2a6
[ruby/io-console] bump up to 0.5.4 2019-12-30 17:38:28 +09:00
Hiroshi SHIBATA
2ef8d5beee
ext/openssl/ossl_ssl.c: nodoc for private methods
[Misc #11712][ruby-core:71565]
2019-12-29 21:09:15 +08:00
Nobuyoshi Nakada
31e2f03512 [ruby/io-console] Enable only interrupt bits on intr: true
baaf929041
2019-12-29 16:26:22 +09:00
卜部昌平
0c2d731ef2 update dependencies 2019-12-26 20:45:12 +09:00
卜部昌平
5e22f873ed decouple internal.h headers
Saves comitters' daily life by avoid #include-ing everything from
internal.h to make each file do so instead.  This would significantly
speed up incremental builds.

We take the following inclusion order in this changeset:

1.  "ruby/config.h", where _GNU_SOURCE is defined (must be the very
    first thing among everything).
2.  RUBY_EXTCONF_H if any.
3.  Standard C headers, sorted alphabetically.
4.  Other system headers, maybe guarded by #ifdef
5.  Everything else, sorted alphabetically.

Exceptions are those win32-related headers, which tend not be self-
containing (headers have inclusion order dependencies).
2019-12-26 20:45:12 +09:00
Kenta Murata
27453b04c8
Update the version of bigdecimal to 2.0.0 (#2784) 2019-12-25 15:21:50 +09:00
aycabta
999a2819a7 [ruby/readline-ext] Version 0.1.0
f5abaf5be1
2019-12-25 10:53:44 +09:00
Nobuyoshi Nakada
58527a7926
[ruby/io-console] bump up to 0.5.3 2019-12-22 13:52:59 +09:00
Nobuyoshi Nakada
77e3078ede [ruby/io-console] Set raw mode strictly same as cfmakeraw
* Default VMIN and VTIME to minimum input.
* Disable parity check bits explicitly.
* Disable all bits for flow control on input.

Co-Authored-By: NARUSE, Yui <naruse@airemix.jp>

5ce201a686
2019-12-18 10:33:05 +09:00
Masataka Pocke Kuwabara
8f52604b47 Remove unnecessary double bangs from Pathname#root? 2019-12-17 14:14:54 +09:00
Nobuyoshi Nakada
e36319249b
[ruby/io-console] bump up to 0.5.2 2019-12-17 13:57:58 +09:00
Yusuke Endoh
b39d5da974
[ruby/io-console] Use TCSANOW to prevent from discarding the input buffer
TCSAFLUSH discards the buffer read before the mode change, which makes
IRB ignore the buffer input immediately after invoked.  TCSANOW
preserves the buffer.

b362920182
2019-12-17 13:55:05 +09:00