[macruby-changes] [2307] MacRuby/trunk/string.c

source_changes at macosforge.org source_changes at macosforge.org
Thu Aug 13 11:38:43 PDT 2009


Revision: 2307
          http://trac.macosforge.org/projects/ruby/changeset/2307
Author:   lsansonetti at apple.com
Date:     2009-08-13 11:38:43 -0700 (Thu, 13 Aug 2009)
Log Message:
-----------
a naive but existing implementation for String#valid_encoding?

Modified Paths:
--------------
    MacRuby/trunk/string.c

Modified: MacRuby/trunk/string.c
===================================================================
--- MacRuby/trunk/string.c	2009-08-13 17:59:09 UTC (rev 2306)
+++ MacRuby/trunk/string.c	2009-08-13 18:38:43 UTC (rev 2307)
@@ -4880,7 +4880,7 @@
 static VALUE
 rb_str_valid_encoding_p(VALUE str, SEL sel)
 {
-    rb_notimplement();
+    return *(VALUE *)str == rb_cByteString ? Qfalse : Qtrue;
 }
 
 /*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090813/85bb066c/attachment.html>


More information about the macruby-changes mailing list