[macruby-changes] [238] MacRuby/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Fri May 30 01:15:26 PDT 2008
Revision: 238
http://trac.macosforge.org/projects/ruby/changeset/238
Author: lsansonetti at apple.com
Date: 2008-05-30 01:15:25 -0700 (Fri, 30 May 2008)
Log Message:
-----------
fix for #64
Modified Paths:
--------------
MacRuby/trunk/encoding.c
MacRuby/trunk/parse.y
Modified: MacRuby/trunk/encoding.c
===================================================================
--- MacRuby/trunk/encoding.c 2008-05-29 22:52:20 UTC (rev 237)
+++ MacRuby/trunk/encoding.c 2008-05-30 08:15:25 UTC (rev 238)
@@ -82,6 +82,7 @@
enc_make(const CFStringEncoding *enc)
{
VALUE v;
+ assert(enc != NULL);
v = (VALUE)CFDictionaryGetValue( (CFDictionaryRef)__encodings,
(const void *)(*enc));
assert(v != 0);
Modified: MacRuby/trunk/parse.y
===================================================================
--- MacRuby/trunk/parse.y 2008-05-29 22:52:20 UTC (rev 237)
+++ MacRuby/trunk/parse.y 2008-05-30 08:15:25 UTC (rev 238)
@@ -6198,8 +6198,10 @@
}
pushback(c);
parser->enc = rb_enc_get(lex_lastline);
-#if !WITH_OBJC
if (parser->enc == NULL)
+#if WITH_OBJC
+ parser->enc = rb_locale_encoding();
+#else
parser->enc = rb_utf8_encoding();
#endif
}
@@ -9644,7 +9646,7 @@
parser->heap = NULL;
#endif
#if WITH_OBJC
- parser->enc = NULL;
+ parser->enc = rb_locale_encoding();
#else
parser->enc = rb_usascii_encoding();
#endif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macruby-changes/attachments/20080530/5893c52d/attachment.htm
More information about the macruby-changes
mailing list