JP Camara 8782e02138 KQueue support for M:N threads
* Allows macOS users to use M:N threads (and technically FreeBSD, though it has not been verified on FreeBSD)

* Include sys/event.h header check for macros, and include sys/event.h when present

* Rename epoll_fd to more generic kq_fd (Kernel event Queue) for use by both epoll and kqueue

* MAP_STACK is not available on macOS so conditionall apply it to mmap flags

* Set fd to close on exec

* Log debug messages specific to kqueue and epoll on creation

* close_invalidate raises an error for the kqueue fd on child process fork. It's unclear rn if that's a bug, or if it's kqueue specific behavior

Use kq with rb_thread_wait_for_single_fd

* Only platforms with `USE_POLL` (linux) had changes applied to take advantage of kernel event queues. It needed to be applied to the `select` so that kqueue could be properly applied

* Clean up kqueue specific code and make sure only flags that were actually set are removed (or an error is raised)

* Also handle kevent specific errnos, since most don't apply from epoll to kqueue

* Use the more platform standard close-on-exec approach of `fcntl` and `FD_CLOEXEC`. The io-event gem uses `ioctl`, but fcntl seems to be the recommended choice. It is also what Go, Bun, and Libuv use

* We're making changes in this file anyways - may as well fix a couple spelling mistakes while here

Make sure FD_CLOEXEC carries over in dup

* Otherwise the kqueue descriptor should have FD_CLOEXEC, but doesn't and fails in assert_close_on_exec
2023-12-20 16:23:38 +09:00
2023-12-17 21:17:19 -08:00
2023-11-14 16:22:03 -05:00
2023-11-23 17:17:28 +09:00
2023-10-11 13:32:54 +09:00
2023-12-19 11:07:47 +09:00
2023-12-07 15:52:35 -05:00
2023-12-17 05:45:33 +08:00
2023-11-23 02:15:42 +09:00
2023-11-23 17:17:28 +09:00
2023-12-17 21:17:48 +09:00
2023-09-26 02:07:32 +09:00
2023-11-02 10:06:03 +09:00
2023-12-07 15:52:35 -05:00
2023-12-19 13:09:36 -08:00
2023-12-15 13:42:19 -05:00
2023-12-19 17:29:09 -05:00
2023-12-20 16:23:38 +09:00
2023-08-25 09:01:21 -04:00
2023-10-12 14:47:01 +09:00
2023-11-14 15:56:57 +09:00
2023-12-07 15:52:35 -05:00
2023-09-27 16:18:05 +09:00
2023-11-30 21:39:28 +09:00
2023-12-18 20:17:43 +09:00
GPL
2023-12-19 09:13:20 -05:00
2023-12-20 07:00:41 +09:00
2023-09-28 10:43:45 -07:00
2023-12-17 00:21:00 +09:00
2023-12-15 13:42:19 -05:00
2023-12-17 00:21:00 +09:00
2023-12-07 15:52:35 -05:00
2023-09-27 16:18:05 +09:00
2023-12-07 15:52:35 -05:00
2023-10-30 00:19:43 +09:00
2023-10-14 11:08:43 +09:00
2023-12-07 09:23:02 -08:00
2023-10-06 16:33:44 +09:00
2023-12-15 11:58:43 +09:00
2023-12-12 17:24:17 -05:00
2023-12-20 16:23:38 +09:00
2023-12-07 15:52:35 -05:00
2023-11-03 10:41:48 +09:00
2023-11-08 08:05:58 -05:00
2023-11-03 10:41:48 +09:00
2023-12-08 01:20:15 +09:00
2023-12-04 13:57:12 -05:00
2023-12-15 11:58:43 +09:00
2023-11-14 15:56:57 +09:00
2023-12-07 15:52:35 -05:00
2023-10-12 14:47:01 +09:00
2023-12-20 16:23:38 +09:00
2023-12-02 21:48:00 +09:00
2023-12-02 21:48:00 +09:00
2023-12-07 15:52:35 -05:00
2023-12-07 15:52:35 -05:00
2023-12-15 13:42:19 -05:00
2023-11-23 17:17:28 +09:00
2023-10-12 14:47:01 +09:00
2023-12-07 09:23:02 -08:00

Actions Status: MinGW Actions Status: RJIT Actions Status: Ubuntu Actions Status: Windows AppVeyor status Travis Status

What is Ruby?

Ruby is an interpreted object-oriented programming language often used for web development. It also offers many scripting features to process plain text and serialized files, or manage system tasks. It is simple, straightforward, and extensible.

Features of Ruby

  • Simple Syntax
  • Normal Object-oriented Features (e.g. class, method calls)
  • Advanced Object-oriented Features (e.g. mix-in, singleton-method)
  • Operator Overloading
  • Exception Handling
  • Iterators and Closures
  • Garbage Collection
  • Dynamic Loading of Object Files (on some architectures)
  • Highly Portable (works on many Unix-like/POSIX compatible platforms as well as Windows, macOS, etc.) cf. https://docs.ruby-lang.org/en/master/maintainers_md.html#label-Platform+Maintainers

How to get Ruby

For a complete list of ways to install Ruby, including using third-party tools like rvm, see:

https://www.ruby-lang.org/en/downloads/

You can download release packages and the snapshot of the repository. If you want to download whole versions of Ruby, please visit https://www.ruby-lang.org/en/downloads/releases/.

Download with Git

The mirror of the Ruby source tree can be checked out with the following command:

$ git clone https://github.com/ruby/ruby.git

There are some other branches under development. Try the following command to see the list of branches:

$ git ls-remote https://github.com/ruby/ruby.git

You may also want to use https://git.ruby-lang.org/ruby.git (actual master of Ruby source) if you are a committer.

How to build

See Building Ruby

Ruby home page

https://www.ruby-lang.org/

Documentation

Mailing list

There is a mailing list to discuss Ruby. To subscribe to this list, please send the following phrase:

join

in the mail subject (not body) to the address ruby-talk-request@ml.ruby-lang.org.

Copying

See the file COPYING.

Feedback

Questions about the Ruby language can be asked on the Ruby-Talk mailing list or on websites like https://stackoverflow.com.

Bugs should be reported at https://bugs.ruby-lang.org. Read "Reporting Issues" for more information.

Contributing

See "Contributing to Ruby", which includes setup and build instructions.

The Author

Ruby was originally designed and developed by Yukihiro Matsumoto (Matz) in 1995.

matz@ruby-lang.org

Description
Languages
Ruby 58.9%
C 29.5%
Rust 6.1%
C++ 2.9%
Yacc 0.9%
Other 1.6%