| Age | Commit message (Collapse) | Author |
|
test/fiddle/test_import.rb:138: warning:
ambiguous first argument; put parentheses or a space even after `-' operator
https://github.com/ruby/fiddle/commit/060eef76ad
|
|
(https://github.com/ruby/fiddle/pull/108)
I would like to check if a symbol is defined before trying to access it.
Some symbols aren't available on all platforms, so instead of raising an
exception, I want to check if it's defined first.
Today we have to do:
```ruby
begin
addr = Fiddle::Handle.sym("something")
# do something
rescue Fiddle::DLError
end
```
I want to write this:
```ruby
if Fiddle::Handle.sym_defined?("something")
addr = Fiddle::Handle.sym("something")
# do something
end
```
https://github.com/ruby/fiddle/commit/9d3371de13
Co-authored-by: Sutou Kouhei <kou@clear-code.com>
|
|
(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/rdoc/commit/13b9da5932
|
|
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
|
|
The test is failing only on trunk-repeat50@phosphorus-docker. This
commit adds some debugging output to debug the failure.
|
|
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
|
|
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
|
|
https://github.com/ruby/irb/commit/5842888255
|
|
|
|
Unclear why, but https://github.com/rubygems/rubygems/commit/2e05dadbc5de created some
warnings in ruby-core CI, so let's revert it.
https://github.com/rubygems/rubygems/commit/729ce3a6e1
|
|
(https://github.com/ruby/irb/pull/369)
Ensure that methods are called even when local variables are defined.
see: https://github.com/ruby/irb/issues/368
https://github.com/ruby/irb/commit/c34d54b8bb
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6482
|
|
This reverts commit 68bc9e2e97d12f80df0d113e284864e225f771c2.
|
|
In the rails/rails CI build for Ruby master we found that some tests
were failing due to inspect on a frozen object being incorrect.
An object's instance variable count was incorrect when frozen causing
the object's inspect to not splat out the object.
This fixes the issue and adds a test for inspecting frozen objects.
Co-Authored-By: Jemma Issroff <jemmaissroff@gmail.com>
Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
Notes:
Merged: https://github.com/ruby/ruby/pull/6478
|
|
https://github.com/rubygems/rubygems/commit/a03d30cd58
|
|
https://github.com/rubygems/rubygems/commit/89362c18ef
Co-authored-by: Mike Dalessio <mike.dalessio@gmail.com>
|
|
https://github.com/ruby/irb/commit/45b539af39
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6353
Merged-By: nobu <nobu@ruby-lang.org>
|
|
https://github.com/rubygems/rubygems/commit/ec3fd55d40
|
|
* So it's easy to review https://github.com/ruby/ruby/pull/6242 +
https://github.com/ruby/ruby/pull/6467 and there are less changes
overall.
|
|
removed
Notes:
Merged: https://github.com/ruby/ruby/pull/6467
|
|
* See https://bugs.ruby-lang.org/issues/18729#note-34
* See [Bug #18729]
Notes:
Merged: https://github.com/ruby/ruby/pull/6467
|
|
just the host
https://github.com/rubygems/rubygems/commit/46990f3292
|
|
fetcher.data[:path]
https://github.com/rubygems/rubygems/commit/4d91cacb1f
Co-authored-by: Jacques Chester <jacques.chester@shopify.com>
|
|
https://github.com/rubygems/rubygems/commit/da7837630b
|
|
https://github.com/rubygems/rubygems/commit/ccca30c77a
Co-authored-by: Nick Schwaderer <nick.schwaderer@shopify.com>
|
|
Th buffer size is small enough and no need to allocate dynamically.
https://github.com/ruby/date/commit/f62bf0a01d
|
|
https://github.com/ruby/date/commit/f51b038074
|
|
|
|
|
|
So that it's found when needed, rather than dynamically modifying
loaded stubs and thus messing with RubyGems internals.
https://github.com/rubygems/rubygems/commit/cd3e7cb9e5
|