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
7 changes: 7 additions & 0 deletions benchmark/string_ascii_only_p.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
prelude: |
ascii = "hello world"
utf8 = "héllo wörld 晦"
benchmark:
ascii_only_true: ascii.ascii_only?
ascii_only_false: utf8.ascii_only?
loop_count: 20000000
7 changes: 7 additions & 0 deletions benchmark/string_valid_encoding_p.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
prelude: |
utf8 = "héllo wörld 晦"
broken = "\xff\xfe".dup.force_encoding("UTF-8")
benchmark:
valid_enc_true: utf8.valid_encoding?
valid_enc_false: broken.valid_encoding?
loop_count: 20000000
1 change: 1 addition & 0 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1199,6 +1199,7 @@ BUILTIN_RB_SRCS = \
$(srcdir)/kernel.rb \
$(srcdir)/pathname_builtin.rb \
$(srcdir)/ractor.rb \
$(srcdir)/string.rb \
$(srcdir)/symbol.rb \
$(srcdir)/timev.rb \
$(srcdir)/thread_sync.rb \
Expand Down
2 changes: 2 additions & 0 deletions depend
Original file line number Diff line number Diff line change
Expand Up @@ -17718,6 +17718,7 @@ string.$(OBJEXT): {$(VPATH)}backward/2/limits.h
string.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
string.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
string.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
string.$(OBJEXT): {$(VPATH)}builtin.h
string.$(OBJEXT): {$(VPATH)}config.h
string.$(OBJEXT): {$(VPATH)}constant.h
string.$(OBJEXT): {$(VPATH)}debug_counter.h
Expand Down Expand Up @@ -17896,6 +17897,7 @@ string.$(OBJEXT): {$(VPATH)}rubyparser.h
string.$(OBJEXT): {$(VPATH)}shape.h
string.$(OBJEXT): {$(VPATH)}st.h
string.$(OBJEXT): {$(VPATH)}string.c
string.$(OBJEXT): {$(VPATH)}string.rbinc
string.$(OBJEXT): {$(VPATH)}subst.h
string.$(OBJEXT): {$(VPATH)}thread.h
string.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
Expand Down
2 changes: 1 addition & 1 deletion ext/socket/ipsocket.c
Original file line number Diff line number Diff line change
Expand Up @@ -1448,7 +1448,7 @@ rsock_revlookup_flag(VALUE revlookup, int *norevlookup)
id = SYM2ID(revlookup);
if (id == id_numeric) return_norevlookup(1);
if (id == id_hostname) return_norevlookup(0);
rb_raise(rb_eArgError, "invalid reverse_lookup flag: :%s", rb_id2name(id));
rb_raise(rb_eArgError, "invalid reverse_lookup flag: :%"PRIsVALUE, rb_sym2str(revlookup));
}
return 0;
#undef return_norevlookup
Expand Down
1 change: 1 addition & 0 deletions inits.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ rb_call_builtin_inits(void)
BUILTIN(warning);
BUILTIN(array);
BUILTIN(hash);
BUILTIN(string);
BUILTIN(symbol);
BUILTIN(timev);
BUILTIN(thread_sync);
Expand Down
4 changes: 2 additions & 2 deletions lib/bundler/spec_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
module Bundler
class SpecSet
include Enumerable
include TSort
include Gem::TSort

def initialize(specs)
@specs = specs
Expand Down Expand Up @@ -327,7 +327,7 @@ def valid_dependencies?(s)

def sorted
@sorted ||= ([lookup["rake"]&.first] + tsort).compact.uniq
rescue TSort::Cyclic => error
rescue Gem::TSort::Cyclic => error
cgems = extract_circular_gems(error)
raise CyclicDependencyError, "Your bundle requires gems that depend" \
" on each other, creating an infinite loop. Please remove either" \
Expand Down
Loading