mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@a454137
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fc1f3f14d3
commit
9dc121cc57
143 changed files with 328 additions and 146 deletions
|
@ -497,6 +497,13 @@ static VALUE string_spec_rb_String(VALUE self, VALUE val) {
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_RB_STRING_VALUE_CSTR
|
||||
static VALUE string_spec_rb_string_value_cstr(VALUE self, VALUE str) {
|
||||
char *c_str = rb_string_value_cstr(&str);
|
||||
return c_str ? Qtrue : Qfalse;
|
||||
}
|
||||
#endif
|
||||
|
||||
void Init_string_spec(void) {
|
||||
VALUE cls;
|
||||
cls = rb_define_class("CApiStringSpecs", rb_cObject);
|
||||
|
@ -733,8 +740,11 @@ void Init_string_spec(void) {
|
|||
#ifdef HAVE_RB_STRING
|
||||
rb_define_method(cls, "rb_String", string_spec_rb_String, 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_RB_STRING_VALUE_CSTR
|
||||
rb_define_method(cls, "rb_string_value_cstr", string_spec_rb_string_value_cstr, 1);
|
||||
#endif
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue