Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Mossuru777/dad695c55fb0d19a1877 to your computer and use it in GitHub Desktop.
Save Mossuru777/dad695c55fb0d19a1877 to your computer and use it in GitHub Desktop.
Ruby 2.1.6 Test Fix Patch for Cygwin Build
diff --git a/ext/-test-/printf/printf.c b/ext/-test-/printf/printf.c
index d913fe5..1ebe804 100644
--- a/ext/-test-/printf/printf.c
+++ b/ext/-test-/printf/printf.c
@@ -28,7 +28,7 @@ printf_test_q(VALUE self, VALUE obj)
}
static char *
-utoa(char *p, char *e, unsigned int x)
+my_utoa(char *p, char *e, unsigned int x)
{
char *e0 = e;
if (e <= p) return p;
@@ -79,12 +79,12 @@ printf_test_call(int argc, VALUE *argv, VALUE self)
*p++ = '0';
}
if (!NIL_P(v = rb_hash_aref(opt, ID2SYM(rb_intern("width"))))) {
- p = utoa(p, format + sizeof(format), NUM2UINT(v));
+ p = my_utoa(p, format + sizeof(format), NUM2UINT(v));
}
if (!NIL_P(v = rb_hash_aref(opt, ID2SYM(rb_intern("prec"))))) {
*p++ = '.';
if (FIXNUM_P(v))
- p = utoa(p, format + sizeof(format), NUM2UINT(v));
+ p = my_utoa(p, format + sizeof(format), NUM2UINT(v));
}
}
*p++ = cnv;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment