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
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ The following default gems are updated.
* fileutils 1.8.0
* io-console 0.8.1
* io-nonblock 0.3.2
* io-wait 0.3.2
* io-wait 0.3.3
* json 2.15.2
* net-http 0.7.0
* openssl 4.0.0.pre
Expand Down
2 changes: 1 addition & 1 deletion ext/io/wait/io-wait.gemspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_VERSION = "0.3.2"
_VERSION = "0.3.3"

Gem::Specification.new do |spec|
spec.name = "io-wait"
Expand Down
3 changes: 0 additions & 3 deletions ext/strscan/strscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ extern size_t onig_region_memsize(const struct re_registers *regs);

static VALUE StringScanner;
static VALUE ScanError;
static ID id_byteslice;

static int usascii_encindex, utf8_encindex, binary_encindex;

Expand Down Expand Up @@ -2287,8 +2286,6 @@ Init_strscan(void)
ID id_scanerr = rb_intern("ScanError");
VALUE tmp;

id_byteslice = rb_intern("byteslice");

usascii_encindex = rb_usascii_encindex();
utf8_encindex = rb_utf8_encindex();
binary_encindex = rb_ascii8bit_encindex();
Expand Down
5 changes: 3 additions & 2 deletions gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,7 @@ typedef struct gc_function_map {
void (*config_set)(void *objspace_ptr, VALUE hash);
void (*stress_set)(void *objspace_ptr, VALUE flag);
VALUE (*stress_get)(void *objspace_ptr);
bool (*checking_shareable)(void *objspace_ptr);
// Object allocation
VALUE (*new_obj)(void *objspace_ptr, void *cache_ptr, VALUE klass, VALUE flags, bool wb_protected, size_t alloc_size);
size_t (*obj_slot_size)(VALUE obj);
Expand Down Expand Up @@ -794,6 +795,7 @@ ruby_modular_gc_init(void)
load_modular_gc_func(config_get);
load_modular_gc_func(stress_set);
load_modular_gc_func(stress_get);
load_modular_gc_func(checking_shareable);
// Object allocation
load_modular_gc_func(new_obj);
load_modular_gc_func(obj_slot_size);
Expand Down Expand Up @@ -874,6 +876,7 @@ ruby_modular_gc_init(void)
# define rb_gc_impl_config_set rb_gc_functions.config_set
# define rb_gc_impl_stress_set rb_gc_functions.stress_set
# define rb_gc_impl_stress_get rb_gc_functions.stress_get
# define rb_gc_impl_checking_shareable rb_gc_functions.checking_shareable
// Object allocation
# define rb_gc_impl_new_obj rb_gc_functions.new_obj
# define rb_gc_impl_obj_slot_size rb_gc_functions.obj_slot_size
Expand Down Expand Up @@ -2804,8 +2807,6 @@ mark_m_tbl(void *objspace, struct rb_id_table *tbl)
}
}

bool rb_gc_impl_checking_shareable(void *objspace_ptr); // in defaut/deafult.c

bool
rb_gc_checking_shareable(void)
{
Expand Down
1 change: 1 addition & 0 deletions gc/gc_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ GC_IMPL_FN void rb_gc_impl_stress_set(void *objspace_ptr, VALUE flag);
GC_IMPL_FN VALUE rb_gc_impl_stress_get(void *objspace_ptr);
GC_IMPL_FN VALUE rb_gc_impl_config_get(void *objspace_ptr);
GC_IMPL_FN void rb_gc_impl_config_set(void *objspace_ptr, VALUE hash);
GC_IMPL_FN bool rb_gc_impl_checking_shareable(void *objspace_ptr);
// Object allocation
GC_IMPL_FN VALUE rb_gc_impl_new_obj(void *objspace_ptr, void *cache_ptr, VALUE klass, VALUE flags, bool wb_protected, size_t alloc_size);
GC_IMPL_FN size_t rb_gc_impl_obj_slot_size(VALUE obj);
Expand Down
14 changes: 14 additions & 0 deletions test/stringio/test_stringio.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1064,6 +1064,20 @@ def test_coderange_after_overwrite
assert_predicate(s.string, :ascii_only?)
end

def test_coderange_after_read_into_buffer
s = StringIO.new("01234567890".b)

buf = "¿Cómo estás? Ça va bien?"
assert_not_predicate(buf, :ascii_only?)

assert_predicate(s.string, :ascii_only?)

s.read(10, buf)

assert_predicate(buf, :ascii_only?)
assert_equal '0123456789', buf
end

require "objspace"
if ObjectSpace.respond_to?(:dump) && ObjectSpace.dump(eval(%{"test"})).include?('"chilled":true') # Ruby 3.4+ chilled strings
def test_chilled_string
Expand Down
2 changes: 1 addition & 1 deletion vm_args.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**********************************************************************

vm_args.c - process method call arguments.
vm_args.c - process method call arguments. Included into vm.c.

$Author$

Expand Down
2 changes: 1 addition & 1 deletion vm_eval.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**********************************************************************

vm_eval.c -
vm_eval.c - Included into vm.c.

$Author$
created at: Sat May 24 16:02:32 JST 2008
Expand Down
2 changes: 1 addition & 1 deletion vm_insnhelper.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**********************************************************************

vm_insnhelper.c - instruction helper functions.
vm_insnhelper.c - instruction helper functions. Included into vm.c.

$Author$

Expand Down