Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion class.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,13 @@ class_get_subclasses_for_ns(struct st_table *tbl, VALUE ns_id)
return NULL;
}

static int
remove_class_from_subclasses_replace_first_entry(st_data_t *key, st_data_t *value, st_data_t arg, int existing)
{
*value = arg;
return ST_CONTINUE;
}

static void
remove_class_from_subclasses(struct st_table *tbl, VALUE ns_id, VALUE klass)
{
Expand All @@ -516,7 +523,7 @@ remove_class_from_subclasses(struct st_table *tbl, VALUE ns_id, VALUE klass)

if (first_entry) {
if (next) {
st_insert(tbl, ns_id, (st_data_t)next);
st_update(tbl, ns_id, remove_class_from_subclasses_replace_first_entry, (st_data_t)next);
}
else {
// no subclass entries in this ns
Expand Down
13 changes: 8 additions & 5 deletions lib/rubygems/remote_fetcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,14 @@ def fetch_http(uri, last_modified = nil, head = false, depth = 0)
def fetch_path(uri, mtime = nil, head = false)
uri = Gem::Uri.new uri

unless uri.scheme
raise ArgumentError, "uri scheme is invalid: #{uri.scheme.inspect}"
end

data = send "fetch_#{uri.scheme}", uri, mtime, head
method = {
"http" => "fetch_http",
"https" => "fetch_http",
"s3" => "fetch_s3",
"file" => "fetch_file",
}.fetch(uri.scheme) { raise ArgumentError, "uri scheme is invalid: #{uri.scheme.inspect}" }

data = send method, uri, mtime, head

if data && !head && uri.to_s.end_with?(".gz")
begin
Expand Down
1 change: 0 additions & 1 deletion zjit/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,6 @@ fn gen_ccall_with_frame(jit: &mut JITState, asm: &mut Assembler, cfunc: *const u
/// Lowering for [`Insn::CCall`]. This is a low-level raw call that doesn't know
/// anything about the callee, so handling for e.g. GC safety is dealt with elsewhere.
fn gen_ccall(asm: &mut Assembler, cfunc: *const u8, args: Vec<Opnd>) -> lir::Opnd {
gen_incr_counter(asm, Counter::inline_cfunc_optimized_send_count);
asm.ccall(cfunc, args)
}

Expand Down
Loading