| Age | Commit message (Collapse) | Author |
|
(https://github.com/ruby/fiddle/pull/112)
This helps to reduce repetition in code. Instead of doing "TYPE_*"
everywhere, you can do `include Fiddle::Types`, and write the type name
directly.
This PR is to help reduce repetition when writing Fiddle code. Right now
we have to type `TYPE_` everywhere, and you also have to include all of
`Fiddle` to access `TYPE_*` constants. With this change, you can just
include `Fiddle::Types` and it will shorten your code and also you only
have to include those constants.
Here is an example before:
```ruby
require "fiddle"
module MMAP
# All Fiddle constants included
include Fiddle
def self.make_function name, args, ret
ptr = Handle::DEFAULT[name]
func = Function.new ptr, args, ret, name: name
define_singleton_method name, &func.to_proc
end
make_function "munmap", [TYPE_VOIDP, # addr
TYPE_SIZE_T], # len
TYPE_INT
make_function "mmap", [TYPE_VOIDP,
TYPE_SIZE_T,
TYPE_INT,
TYPE_INT,
TYPE_INT,
TYPE_INT], TYPE_VOIDP
make_function "mprotect", [TYPE_VOIDP, TYPE_SIZE_T, TYPE_INT], TYPE_INT
end
```
After:
```ruby
require "fiddle"
module MMAP
# Only type names included
include Fiddle::Types
def self.make_function name, args, ret
ptr = Fiddle::Handle::DEFAULT[name]
func = Fiddle::Function.new ptr, args, ret, name: name
define_singleton_method name, &func.to_proc
end
make_function "munmap", [VOIDP, # addr
SIZE_T], # len
INT
make_function "mmap", [VOIDP, SIZE_T, INT, INT, INT, INT], VOIDP
make_function "mprotect", [VOIDP, SIZE_T, INT], INT
end
```
We only need to import the type names, and you don't have to type
`TYPE_` over and over. I think this makes Fiddle code easier to read.
https://github.com/ruby/fiddle/commit/49fa7233e5
Co-authored-by: Sutou Kouhei <kou@clear-code.com>
|
|
(https://github.com/ruby/fiddle/pull/111)
This commit adds constants for unsigned values. Currently we can use `-`
to mean "unsigned", but I think having a specific name makes Fiddle more
user friendly. This commit continues to support `-`, but introduces
negative constants with "unsigned" names
I think this will help to eliminate [this
code](https://github.com/ruby/ruby/blob/3a56bf0bcc66e14ffe5ec89efc32ecfceed180f4/lib/mjit/c_type.rb#L31-L38)
https://github.com/ruby/fiddle/commit/2bef0f1082
Co-authored-by: Sutou Kouhei <kou@clear-code.com>
|
|
GitHub: fix GH-102
We can't use Fiddle::Closure before we fork the process. If we do it,
the process may be crashed with SELinux.
See https://github.com/ruby/fiddle/issues/102#issuecomment-1241763091
for details.
Reported by Vít Ondruch. Thanks!!!
https://github.com/ruby/fiddle/commit/1343ac7a95
|
|
https://github.com/ruby/date/commit/d21c69450a
|
|
https://github.com/ruby/psych/commit/7c211a43c1
|
|
https://github.com/ruby/psych/commit/447d372dcd
|
|
https://github.com/ruby/rdoc/commit/13b9da5932
|
|
https://hackerone.com/reports/1321358
https://github.com/ruby/rdoc/commit/2ebf8fd510
|
|
https://hackerone.com/reports/1321358
https://github.com/ruby/rdoc/commit/8c07cc4657
|
|
https://hackerone.com/reports/1187156
https://github.com/ruby/rdoc/commit/5dedb5741d
|
|
https://github.com/ruby/rdoc/commit/ac35485be6
|
|
https://hackerone.com/reports/1187156
https://github.com/ruby/rdoc/commit/7cecf1efae
|
|
https://hackerone.com/reports/1187156
https://github.com/ruby/rdoc/commit/1ad2dd3ca2
|
|
We set the PC in branch_stub_hit(), which only makes sense if we're
running with the intended iseq for the stub. We ran into an issue caught
by this while tweaking code layout.
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
|
|
For logical instructions such as AND, there is a constraint that the N
part of the bitmask immediate must be 0. We weren't respecting this
condition previously and were silently emitting undefined instructions.
Check for this condition in the assembler and tweak the backend to
correctly detect whether a number could be encoded as an immediate in a
32 bit logical instruction. Due to the nature of the immediate encoding,
the same numeric value encodes differently depending on the size of
the register the instruction works on.
We currently don't have cases where we use 32 bit immediates but we ran
into this encoding issue during development.
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
|
|
https://github.com/ruby/open-uri/commit/d8899ae4ac
|
|
* Adapt doc guide to new GFM features
* Adapt doc guide to new GFM features
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
|
|
https://github.com/ruby/ruby/actions/runs/3199301563/jobs/5224898228
https://github.com/ruby/rdoc/commit/369e4fa32d60bc00982801a6848efe5338603ac5
|
|
The test is failing only on trunk-repeat50@phosphorus-docker. This
commit adds some debugging output to debug the failure.
|
|
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
|
|
Integrate io_streams.rdoc into io.c
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
https://github.com/ruby/rdoc/commit/512cc55a0e
|
|
https://github.com/ruby/rdoc/commit/3b3a583580
|
|
https://github.com/ruby/rdoc/commit/333952a62d
|
|
https://github.com/ruby/rdoc/commit/d263a2c9c4
|
|
https://github.com/ruby/rdoc/commit/1318048877
|
|
When the generic_iv_tbl is resized up, rebuild_table performs
allocations that can trigger GC. If autocompaction is enabled, then
moved objects are removed from and inserted into the generic_iv_tbl.
This may cause another call to rebuild_table to resize the
generic_iv_tbl. When returning back to the original rebuild_table, some
of the data may be stale, causing the generic_iv_tbl to be corrupted.
This commit changes rebuild_table to only read data from the st_table
after the allocations have completed.
Co-Authored-By: Matt Valentine-House <matt@eightbitraptor.com>
Notes:
Merged: https://github.com/ruby/ruby/pull/6494
|
|
Notes:
Merged-By: ioquatix <samuel@codeotaku.com>
|
|
https://github.com/ruby/rdoc/commit/b16d3f1727
|
|
https://github.com/ruby/rdoc/commit/0cb3df713b
|
|
|
|
silently ignored
https://github.com/ruby/open-uri/commit/4b91b11730
|
|
during communication. Allow versions are OpenSSL::SSL::SSLContext::METHODS
https://github.com/ruby/open-uri/commit/8729858517
|
|
https://github.com/ruby/open-uri/commit/63f466d6ed
|
|
https://github.com/ruby/open-uri/commit/a8f1605ae9
|
|
`Object#extend(mod)` bump the global constant cache if the module
has constants of its own.
So by moving these constants outside of `Meta` we avoid bumping
the cache.
https://github.com/ruby/open-uri/commit/363c399bac
|
|
This library originally used `abbrev` to expand abbreviations into
fully-qualified classes, but that was replaced in
https://github.com/ruby/rdoc/commit/f9ffe6684e2afeac65c62bf1a5a2fce729f21001
`abbrev` is no longer used anywhere, so this commit removes the require.
https://github.com/ruby/rdoc/commit/b76775f27d
|
|
in a list
https://github.com/rubygems/rubygems/commit/3f71d882e9
|
|
Also remove the ancient word "Windows NT".
|
|
https://github.com/ruby/irb/commit/5842888255
|
|
https://github.com/ruby/irb/commit/564bd91387
|
|
Create line
https://github.com/ruby/irb/commit/64d6a461d5
|
|
https://github.com/ruby/irb/commit/e58a3c1b39
|
|
|
|
|
|
Deprecates IDB::ReidlineInputMethod and USE_REIDLINE in favor of
IRB::RelineInputMethod and USE_RELINE. The Input method uses Reline to
read input from the console, so it can be named directly after the
Reline library like other inputs methods are (Readline, Stdio, etc.).
https://github.com/ruby/irb/commit/5bcade7130
|
|
|
|
https://github.com/ruby/irb/commit/f9960dbd37
|
|
https://github.com/ruby/irb/commit/a6bfa7b2e6
|