Commit graph

64552 commits

Author SHA1 Message Date
git
fdcbb288ab * 2020-07-23 [ci skip] 2020-07-23 00:35:16 +09:00
Jeremy Evans
d47e124857 Switch reserved for numbered parameter warning to SyntaxError 2020-07-22 08:34:51 -07:00
Nobuyoshi Nakada
50aac2ffd5
Share the size for sigaltstack between configure.ac and signal.c 2020-07-22 21:28:23 +09:00
Jake Zimmerman
8b0dc77a62 configure.ac: Bump the size of sigaltstack
The RubyVM uses C macro defines to feature detect whether
`backtrace(2)` support is available, and if so it includes C level backtraces
when the RubyVM itself crashes.

But on my machine, C level backtraces from `vm_dump.c` didn't work when
using a version of Ruby buillt on the machine, but worked fine when using a
version of Ruby built on another machine and copied to my machine.

The default autoconf test for backtraces uses a sigaltstack size that is
too small, so the SIGSEGV signal handler itself causes a SIGSEGV).
I noticed that signal.c uses a larger sigaltstack size:

https://github.com/ruby/ruby/blob/v2_6_5/signal.c#L568

The specific variables it looks at:

- `HAVE_BACKTRACE`

  this is a macro defined by autoconf because there is a line in the
  configure script like `AC_CHECK_FUNCS(backtrace)` (see the autoconf
  docs for more).

- `BROKEN_BACKTRACE`

  this comes from a custom program that Ruby's configure script runs to
  attempt to figure out whether actually using backtrace(2) in a real
  program works. You can see the autoconf program here.

  <https://github.com/ruby/ruby/blob/v2_6_5/configure.ac#L2817-L2863>

It uses sigaltstack and SA_ONSTACK to create a seperate stack for
handling signals.

The problem was: SIGSTKSZ (which comes from a system header!) was not
suggesting a large enough stack size. When checking on an Ubuntu 16.04
box, we found that SIGSTKSZ was 8192 and MINSIGSTKSZ was 2048.
2020-07-22 20:46:36 +09:00
Hiroshi SHIBATA
7befc0cdfc
Promote optparse to default gems 2020-07-22 18:38:51 +09:00
BurdetteLamar
a50750c8a9 Enhanced RDoc for Array 2020-07-21 17:07:12 -05:00
BurdetteLamar
d29de7b31b Enhanced RDoc for Array 2020-07-21 17:07:12 -05:00
BurdetteLamar
8a974e0fcb Enhanced RDoc for Array 2020-07-21 17:07:12 -05:00
aycabta
20172672db Add require 'irb/ruby-lex' to use RubyLex 2020-07-22 04:11:38 +09:00
aycabta
ee2529dffe Sometimes result indicator (=>) isn't shown 2020-07-22 03:49:17 +09:00
aycabta
0faf02718a Use simple assersion 2020-07-22 03:13:17 +09:00
git
1d0e8fd4bb * 2020-07-22 [ci skip] 2020-07-22 02:42:15 +09:00
hyrious
02951a45f0 [ruby/rdoc] Create link to unary operator methods correctly
54500cf12a
2020-07-22 02:35:12 +09:00
Benoit Tigeot
7693aa7056 [ruby/rdoc] Remove empty lines from html file by using ERB trim_mode flag
9e27299a46
2020-07-22 02:34:58 +09:00
Jeremy Evans
38480ad507 [ruby/rdoc] Fix parsing of rb_define_module_under
Fixes Ruby Bug #15819

94a052d833
2020-07-22 02:34:49 +09:00
aycabta
f76d67f484 [ruby/rdoc] Fix RDoc::Context#instance_method_list
The warn method returns nil, it's a bug of #instance_method_list.

a20df89263
2020-07-22 02:34:26 +09:00
Nobuhiro IMAI
f6e789e3b0 [ruby/irb] handle rescue modifier properly
6de1341f5e
2020-07-22 02:31:47 +09:00
aycabta
22d38d5475 [ruby/irb] Add test_eval_object_without_inspect_method
c0d9a26bce
2020-07-22 02:31:47 +09:00
Masataka Pocke Kuwabara
b40e925c92 [ruby/irb] Fix error when inspect is called but not found in inspector
ce6d53e6d9
2020-07-22 02:31:47 +09:00
aycabta
4268084d69 [ruby/irb] Add encoding magic comments of editors
f8c10ea24b
2020-07-22 02:31:47 +09:00
aycabta
c72a2fad97 [ruby/irb] Simplify RubyLex.compile_with_errors_suppressed
nobu-san reviewed,

https://github.com/ruby/irb/pull/106#pullrequestreview-423400033
> How about lexer = Ripper::Lexer.new(";\n#{code}", nil, 0)?
> Encoding pragma is effective only at the beginning.
> And the semicolon and newline will be skipped because the position is before
> the initial pos.

I employ the way.

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>

e593cc65b7
2020-07-22 02:31:46 +09:00
aycabta
1dfd24a7fc [ruby/irb] Suppress incomplete encoding magic comment error
443e90af80
2020-07-22 02:31:46 +09:00
aycabta
78ccab2530 [ruby/irb] Suppress incomplete coding magic comment error
6a457edbd1
2020-07-22 02:31:46 +09:00
Tanaka Akira
48eb1ad2c3 [DOC] time.c document updated.
* fraction -> subsecond
  for consistency with method name

* The sentence,
  "A non-portable feature allows the offset to be negative on some systems.",
  is removed.
  Time before 1970 should work portably now.
  If localtime() doesn't work before 1970,
  Ruby should extrapolate it.

* Time::new -> Time.new
  "::" for method call is not common notation now.

* Time#to_i truncates subsecond

* Time#to_f approximates a value in Time object

* Time#to_r
  The sentence,
  "You can use this method to convert _time_ to another Epoch.",
  is removed.
  It is not clear because no actual example of "another Epoch" is given.

* Time#usec truncates fraction of microseconds.

* Time#nsec truncates fraction of nanoseconds.

* describe Time#inspect shows subsecond since Ruby 2.7.0.
2020-07-21 20:28:36 +09:00
Alan Wu
73ee1295a3 Add memsize support for the call cache table
Each class/module/iclass can potentially have their own cc table.
Count their malloc usage.
2020-07-20 20:20:08 -04:00
git
ac3dbbd4db * 2020-07-21 [ci skip] 2020-07-21 09:18:37 +09:00
Gabriel Nagy
a8eecceaef [ruby/csv] Bump minimum ruby version to 2.5.0 (#159)
A dependency to stringio was added to csv, which requires Ruby version
>= 2.5. Bump the gemspec version accordingly.
bc5a26029f
2020-07-21 09:17:56 +09:00
Sutou Kouhei
c6f389d84e [ruby/csv] Move doc/* to doc/csv/* to work in ruby/ruby too
910f8e0c5d
2020-07-21 09:17:54 +09:00
Burdette Lamar
935d0b3d05 [ruby/csv] Enhanced RDoc for several methods (#158)
* Enhanced RDoc for several methods

* Update lib/csv.rb

Co-authored-by: Sutou Kouhei <kou@cozmixng.org>

Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
72e8b00e51
2020-07-20 15:39:31 +09:00
Sutou Kouhei
78893f16b2 [ruby/csv] Bump version
f9cd046d66
2020-07-20 15:39:29 +09:00
Sutou Kouhei
d919b0e4f9 [ruby/csv] Require stringio 0.1.3 or later
09dd9f2771
2020-07-20 15:39:26 +09:00
Nobuyoshi Nakada
16daee1c75 [ruby/stringio] Bump version to 0.1.3
376516cd2d
2020-07-20 14:59:19 +09:00
Nobuyoshi Nakada
ddb2acbba6 [ruby/stringio] No compatibility check in US-ASCII case
59df1c8293
2020-07-20 14:59:19 +09:00
Nobuyoshi Nakada
c62aff1632 [ruby/stringio] Added non-ASCII but convertible encoding case
1d28e5c969
2020-07-20 14:59:19 +09:00
Nobuyoshi Nakada
a7c67fc6da [ruby/stringio] Removed wrong UNREACHABLE
f528538d10
2020-07-20 14:59:19 +09:00
Nobuyoshi Nakada
574871781b [ruby/stringio] Bump version to 0.1.2
8cbe3f7397
2020-07-20 14:59:19 +09:00
Nobuyoshi Nakada
6ff9604f85 [ruby/stringio] Raise an error if encoding conversion not succeeded
As `rb_str_conv_enc()` returns the argument string object itself
unchanged when any conversion failed, check the incompatibility in
that case.

Fixes https://github.com/ruby/stringio/issues/13

ede6bdcc71
2020-07-20 14:59:19 +09:00
Nobuyoshi Nakada
840115bf46 Make StringIO encoding fixed
Get rid of affects by default external encoding.
2020-07-20 14:59:19 +09:00
Nobuyoshi Nakada
d2bf6133f6
Remove trailing spaces [ci skip] 2020-07-20 13:34:16 +09:00
Samuel Williams
1b3a6847be Move declarations to private internal/thread.h header. 2020-07-20 13:20:58 +12:00
Samuel Williams
f3462d99a3 Rename rb_current_thread_scheduler to rb_thread_scheduler_if_nonblocking.
Correctly capture thread before releasing GVL and pass as argument to
`rb_thread_scheduler_if_nonblocking`.
2020-07-20 13:20:58 +12:00
Samuel Williams
9f6a3d0306 Add multi-threaded I/O test. 2020-07-20 13:20:58 +12:00
Samuel Williams
e6e9cef06e Improve consistency of tests. 2020-07-20 13:20:58 +12:00
Samuel Williams
a3ac1bf450 Add more timeouts to macos, mjit, ubuntu and windows workflows. 2020-07-20 10:58:57 +12:00
git
da0e8158c9 * 2020-07-20 [ci skip] 2020-07-20 03:35:19 +09:00
Sutou Kouhei
4fcfa85cb6
[ruby/csv] CSV.generate_line: use the encoding of the first non ASCII field as the expected encoding
See also: https://github.com/ruby/stringio/issues/13#issuecomment-660543554

004cf49d18
2020-07-20 02:32:55 +09:00
Sutou Kouhei
178649e6dc
[ruby/csv] force_quotes: add support for specifying the target indexes or names
GitHub: fix GH-153

Reported by Aleksandr. Thanks!!!

8812c58a26
2020-07-20 02:32:54 +09:00
Burdette Lamar
d9749b4715
[ruby/csv] RDoc for converters (#157)
* More on RDoc for converters

* More on RDoc for converters

* Fix indent

Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
6044976160
2020-07-20 02:32:54 +09:00
Burdette Lamar
d7c42df0b1
[ruby/csv] Adding call-seq to methods RDoc (#155)
* Adding call-seq to methods RDoc

Co-authored-by: Sutou Kouhei <kou@cozmixng.org>


dbd860c1cd
2020-07-20 02:32:54 +09:00
Burdette Lamar
544d82f49b
[ruby/csv] RDoc: summary lists for options (#154)
* RDoc: summary lists for options

* Enhanced RDoc for certain attributes and instance methods

* Enhanced RDoc for certain attributes and instance methods

* Enhanced RDoc for certain attributes and instance methods

* Enhanced RDoc for certain attributes and instance methods
72d8a25dc9
2020-07-20 02:32:54 +09:00