summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--ToDo2
-rw-r--r--lib/base64.rb26
-rw-r--r--parse.y2
4 files changed, 18 insertions, 24 deletions
diff --git a/ChangeLog b/ChangeLog
index e377fec..550d743 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,10 @@ Thu Apr 2 18:31:46 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
* eval.c (obj_call_init): every object call `initialize'.
+Wed Apr 1 08:51:53 1998 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+
+ * parse.y (stmt): UNTIL_MOD should be for stmt, not only for expr.
+
Wed Apr 1 01:20:31 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
* object.c (true_and): boolean operators &, | and ^.
@@ -28,16 +32,14 @@ Mon Mar 30 11:12:29 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
* eval.c (Init_eval): `class_eval': alias to the module_eval.
-Mon Mar 30 14:07:07 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
-
- * string.c (str_intern): typo in error message.
-
-Mon Mar 30 14:06:19 1998 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+Mon Mar 30 18:50:42 1998 Tadayoshi Funaba <tadf@kt.rim.or.jp>
* string.c (str_capitalize_bang): did not check string modification.
* string.c (str_delete_bang): wrong conversion.
+ * string.c (str_intern): typo in error message.
+
Mon Mar 30 01:44:13 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
* eval.c (obj_instance_eval): accepts block as evaluation body.
diff --git a/ToDo b/ToDo
index 9710c42..674ec3b 100644
--- a/ToDo
+++ b/ToDo
@@ -1,3 +1,5 @@
+* call `initialize' for built-in classes.
+* 0 as flase value
* non-blocking open/write for thread
* package or access control for global variables
* format
diff --git a/lib/base64.rb b/lib/base64.rb
index 96208a6..8b75dda 100644
--- a/lib/base64.rb
+++ b/lib/base64.rb
@@ -1,3 +1,5 @@
+require "kconv"
+
def decode64(str)
string = ''
for line in str.split("\n")
@@ -10,30 +12,18 @@ def decode64(str)
return string
end
-def j2e(str)
- while str =~ /\033\$B([^\033]*)\033\(B/
- s = $1
- pre, post = $`, $'
- s.gsub!(/./) { |ch|
- (ch[0]|0x80).chr
- }
- str = pre + s + post
- end
-# str.gsub!(/\033\$B([^\033]*)\033\(B/) {
-# $1.gsub!(/./) { |ch|
-# (ch[0]|0x80).chr
-# }
-# }
- str
-end
-
def decode_b(str)
str.gsub!(/=\?ISO-2022-JP\?B\?([!->@-~]+)\?=/i) {
decode64($1)
}
+ str = Kconv::toeuc(str)
+ str.gsub!(/=\?SHIFT_JIS\?B\?([!->@-~]+)\?=/i) {
+ decode64($1)
+ }
+ str = Kconv::toeuc(str)
str.gsub!(/\n/, ' ')
str.gsub!(/\0/, '')
- j2e(str)
+ str
end
def encode64(bin)
diff --git a/parse.y b/parse.y
index 4ad41e8..35ce02c 100644
--- a/parse.y
+++ b/parse.y
@@ -332,7 +332,7 @@ stmt : iterator iter_do_block
$$ = NEW_WHILE(cond($3), $1, 1);
}
}
- | expr kUNTIL_MOD expr
+ | stmt kUNTIL_MOD expr
{
value_expr($3);
if (nd_type($1) == NODE_BEGIN) {