Merge branch 'dump_rta'
[nit.git] / lib / opts.nit
index a60760f..ec3c006 100644 (file)
@@ -138,7 +138,7 @@ abstract class OptionParameter
        redef fun read_param(it)
        do
                super
-               if it.is_ok and it.item.first != '-' then
+               if it.is_ok and it.item.chars.first != '-' then
                        value = convert(it.item)
                        it.next
                else
@@ -265,6 +265,7 @@ class OptionContext
                while parseargs and it.is_ok do
                        var str = it.item
                        if str == "--" then
+                               it.next
                                rest.add_all(it.to_a)
                                parseargs = false
                        else
@@ -272,7 +273,7 @@ class OptionContext
                                if str.last_index_of('-') == 0 and str.length > 2 then
                                        var next_called = false
                                        for i in [1..str.length] do
-                                               var short_opt = "-" + str[i].to_s
+                                               var short_opt = "-" + str.chars[i].to_s
                                                if _optmap.has_key(short_opt) then
                                                        var option = _optmap[short_opt]
                                                        if option isa OptionParameter then