This is a multi-part message in MIME format.
--------------090707070905080605060804
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Nobu,

Thank you for the --encoding ption.  Looks like you have two goto 
labels reversed.  The attached patch fixes it, I think.
	
	David

David Flanagan wrote:
> Nobuyoshi Nakada wrote:
>> Hi,
>>
>> At Wed, 17 Oct 2007 02:54:30 +0900,
>> David Flanagan wrote in [ruby-core:12703]:
>>> However, notice what happens if I try an unknown encoding that begins 
>>> with 'u', 'a', 'n', 'e', or 's':
>>>
>>> $ ./ruby1.9 -Kutf
>>> ./ruby1.9: invalid option -t  (-h will show valid options)
>>
>> It's for the backward compatibility's sake.
>>
>> $ ruby1.8 -Kutf
>> ruby1.8: invalid option -t  (-h will show valid options)
>>
>> On many platforms, multiple options in shebang are handled
>> differently.
>>
>>> I think this is a very confusing error message!
>>
>> Should be a separated option?
>>
> 
> I suspect that is the right thing to do.  It just seems strange that 
> -Kutf8 gives one error message and -K8utf gives a completely different 
> one and -Kunc gives no error message but probably doesn't do what the 
> user meant.
> 
> On second thought, I suppose I'd recommend that you revert -K to its 1.8 
> behavior and add an new --encoding ption for full encoding names.
> 
>     David
> 
> 
> 


--------------090707070905080605060804
Content-Type: text/plain;
 nameatch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filenameatch"

Index: ruby.c
--- ruby.c      (revision 13733)
+++ ruby.c      (working copy)
@@ -785,8 +785,8 @@
                }
            }
            else if (strncmp("encoding s, 9) 0) {
-               if (*(s + )) goto noencoding;
-               goto encoding;
+               if (*(s + )) goto encoding;
+               goto noencoding;
            }
            else if (strcmp("version", s) 0)
                opt->version  ;

--------------090707070905080605060804--