Skip to content

Commit eff94ef

Browse files
committed
Remove specs for rb_fstring()
* It is a private function and the specs are redundant with specs for rb_str_to_interned_str().
1 parent 55634b7 commit eff94ef

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

spec/ruby/optional/capi/ext/string_spec.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,6 @@ VALUE string_spec_rb_str_set_len_RSTRING_LEN(VALUE self, VALUE str, VALUE len) {
5151
return INT2FIX(RSTRING_LEN(str));
5252
}
5353

54-
VALUE rb_fstring(VALUE str); /* internal.h, used in ripper */
55-
56-
VALUE string_spec_rb_str_fstring(VALUE self, VALUE str) {
57-
return rb_fstring(str);
58-
}
59-
6054
VALUE string_spec_rb_str_buf_new(VALUE self, VALUE len, VALUE str) {
6155
VALUE buf;
6256

@@ -597,7 +591,6 @@ void Init_string_spec(void) {
597591
VALUE cls = rb_define_class("CApiStringSpecs", rb_cObject);
598592
rb_define_method(cls, "rb_cstr2inum", string_spec_rb_cstr2inum, 2);
599593
rb_define_method(cls, "rb_cstr_to_inum", string_spec_rb_cstr_to_inum, 3);
600-
rb_define_method(cls, "rb_fstring", string_spec_rb_str_fstring, 1);
601594
rb_define_method(cls, "rb_str2inum", string_spec_rb_str2inum, 2);
602595
rb_define_method(cls, "rb_str_append", string_spec_rb_str_append, 2);
603596
rb_define_method(cls, "rb_str_buf_new", string_spec_rb_str_buf_new, 2);

spec/ruby/optional/capi/string_spec.rb

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -498,25 +498,6 @@ def inspect
498498
end
499499
end
500500

501-
describe "rb_fstring" do
502-
it 'returns self if the String is frozen' do
503-
input = 'foo'.freeze
504-
output = @s.rb_fstring(input)
505-
506-
output.should equal(input)
507-
output.should.frozen?
508-
end
509-
510-
it 'returns a frozen copy if the String is not frozen' do
511-
input = 'foo'
512-
output = @s.rb_fstring(input)
513-
514-
output.should.frozen?
515-
output.should_not equal(input)
516-
output.should == 'foo'
517-
end
518-
end
519-
520501
describe "rb_str_subseq" do
521502
it "returns a byte-indexed substring" do
522503
str = "\x00\x01\x02\x03\x04".force_encoding("binary")

0 commit comments

Comments
 (0)