Index: EcnlProtoTool/trunk/mruby-1.3.0/test/assert.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/assert.rb	(revision 321)
+++ EcnlProtoTool/trunk/mruby-1.3.0/test/assert.rb	(revision 331)
@@ -11,9 +11,5 @@
   while i < len
     str = args[i].to_s
-    begin
-      __printstr__ str
-    rescue NoMethodError
-      __t_printstr__ str rescue print str
-    end
+    __t_printstr__ str rescue print str
     i += 1
   end
@@ -49,5 +45,6 @@
     $mrbtest_assert = []
     $mrbtest_assert_idx = 0
-    if(!yield || $mrbtest_assert.size > 0)
+    yield
+    if($mrbtest_assert.size > 0)
       $asserts.push(assertion_string('Fail: ', str, iso, nil))
       $ko_test += 1
@@ -218,5 +215,5 @@
 
   $asserts.each do |msg|
-    puts msg
+    t_print "#{msg}\n"
   end
 
@@ -237,5 +234,5 @@
 # Performs fuzzy check for equality on methods returning floats
 def check_float(a, b)
-  tolerance = 1e-12
+  tolerance = Mrbtest::FLOAT_TOLERANCE
   a = a.to_f
   b = b.to_f
Index: EcnlProtoTool/trunk/mruby-1.3.0/test/bintest.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/bintest.rb	(revision 321)
+++ EcnlProtoTool/trunk/mruby-1.3.0/test/bintest.rb	(revision 331)
@@ -4,5 +4,5 @@
 def cmd(s)
   case RbConfig::CONFIG['host_os']
-  when /mswin(?!ce)|mingw|cygwin|bccwin/
+  when /mswin(?!ce)|mingw|bccwin/
     "bin\\#{s}.exe"
   else
@@ -13,5 +13,5 @@
 def shellquote(s)
   case RbConfig::CONFIG['host_os']
-  when /mswin(?!ce)|mingw|cygwin|bccwin/
+  when /mswin(?!ce)|mingw|bccwin/
     "\"#{s}\""
   else
@@ -21,4 +21,9 @@
 
 ARGV.each do |gem|
+  case RbConfig::CONFIG['host_os']
+  when /mswin(?!ce)|mingw|bccwin/
+    gem = gem.gsub('\\', '/')
+  end
+
   Dir["#{gem}/bintest/**/*.rb"].each do |file|
     load file
Index: EcnlProtoTool/trunk/mruby-1.3.0/test/t/array.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/array.rb	(revision 321)
+++ EcnlProtoTool/trunk/mruby-1.3.0/test/t/array.rb	(revision 331)
@@ -12,4 +12,12 @@
 assert('Array.[]', '15.2.12.4.1') do
   assert_equal([1, 2, 3], Array.[](1,2,3))
+end
+
+class SubArray < Array
+end
+
+assert('SubArray.[]') do
+  a = SubArray[1, 2, 3]
+  assert_equal(SubArray, a.class)
 end
 
@@ -83,4 +91,12 @@
   a[2...4] = 6
   assert_equal([1,2,6,5], a)
+
+  # passing self (#3274)
+  a = [1,2,3]
+  a[1,0] = a
+  assert_equal([1,1,2,3,2,3], a)
+  a = [1,2,3]
+  a[-1,0] = a
+  assert_equal([1,2,1,2,3,3], a)
 end
 
@@ -99,4 +115,9 @@
 assert('Array#concat', '15.2.12.5.8') do
   assert_equal([1,2,3,4], [1, 2].concat([3, 4]))
+
+  # passing self (#3302)
+  a = [1,2,3]
+  a.concat(a)
+  assert_equal([1,2,3,1,2,3], a)
 end
 
@@ -319,5 +340,6 @@
   a = [ 1, 2, 3 ]
 
-  assert_true(a.hash.is_a? Integer)
+  #assert_true(a.hash.is_a? Integer)
+  assert_true(a.hash.is_a? Integral)  # mruby special
   assert_equal([1,2].hash, [1,2].hash)
 end
@@ -348,2 +370,21 @@
   assert_equal({Array=>200}, h)
 end
+
+assert("Array#rindex") do
+  class Sneaky
+    def ==(*)
+      $a.clear
+      $a.replace([1])
+      false
+    end
+  end
+  $a = [2, 3, 4, 5, 6, 7, 8, 9, 10, Sneaky.new]
+  assert_equal 0, $a.rindex(1)
+end
+
+assert('Array#freeze') do
+  a = [].freeze
+  assert_raise(RuntimeError) do
+    a[0] = 1
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.3.0/test/t/class.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/class.rb	(revision 321)
+++ EcnlProtoTool/trunk/mruby-1.3.0/test/t/class.rb	(revision 331)
@@ -385,6 +385,67 @@
 end
 
+assert('class variable definition in singleton_class') do
+  class ClassVariableDefinitionInSingletonTest
+    class << self
+      @@class_variable = "value"
+    end
+    def class_variable
+      @@class_variable
+    end
+  end
+
+  assert_equal("value", ClassVariableDefinitionInSingletonTest.new.class_variable)
+end
+
+assert('class variable in module and class << self style class method') do
+  module ClassVariableInModuleTest
+    @@class_variable = "value"
+    class << self
+      def class_variable
+        @@class_variable
+      end
+    end
+  end
+
+  assert_equal("value", ClassVariableInModuleTest.class_variable)
+end
+
+assert('child class/module defined in singleton class get parent constant') do
+  actual = module GetParentConstantTest
+            EXPECT = "value"
+            class << self
+              class CHILD
+                class << self
+                    EXPECT
+                end
+              end
+            end
+          end
+  assert_equal("value", actual)
+end
+
+assert('overriding class variable with a module (#3235)') do
+  module ModuleWithCVar
+    @@class_variable = 1
+  end
+  class CVarOverrideTest
+    @@class_variable = 2
+    include ModuleWithCVar
+
+    assert_equal(1, @@class_variable)
+  end
+end
+
 assert('class with non-class/module outer raises TypeError') do
   assert_raise(TypeError) { class 0::C1; end }
   assert_raise(TypeError) { class []::C2; end }
 end
+
+assert("remove_method doesn't segfault if the passed in argument isn't a symbol") do
+  klass = Class.new
+  assert_raise(TypeError) { klass.remove_method nil }
+  assert_raise(TypeError) { klass.remove_method 123 }
+  assert_raise(TypeError) { klass.remove_method 1.23 }
+  assert_raise(NameError) { klass.remove_method "hello" }
+  assert_raise(TypeError) { klass.remove_method Class.new }
+end
Index: EcnlProtoTool/trunk/mruby-1.3.0/test/t/codegen.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.3.0/test/t/codegen.rb	(revision 331)
+++ EcnlProtoTool/trunk/mruby-1.3.0/test/t/codegen.rb	(revision 331)
@@ -0,0 +1,75 @@
+##
+# Codegen tests
+
+assert('peephole optimization does not eliminate move whose result is reused') do
+  assert_raise LocalJumpError do
+    def method
+      yield
+    end
+    method(&a &&= 0)
+  end
+end
+
+assert('empty condition in ternary expression parses correctly') do
+  assert_equal(() ? 1 : 2, 2)
+end
+
+assert('method call with exactly 127 arguments') do
+  def args_to_ary(*args)
+    args
+  end
+
+  assert_equal [0]*127, args_to_ary(
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, \
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, \
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, \
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, \
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, \
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+  )
+end
+
+assert('nested empty heredoc') do
+  _, a = nil, <<B
+#{<<A}
+A
+B
+  assert_equal "\n", a
+end
+
+assert('splat in case splat') do
+  a = *case
+    when 0
+      * = 1
+  end
+
+  assert_equal [1], a
+end
+
+assert('undef with 127 or more arguments') do
+  assert_raise NameError do
+    undef
+      a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a,
+      a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a,
+      a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a,
+      a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a
+  end
+end
+
+assert('next in normal loop with 127 arguments') do
+  assert_raise NameError do
+    while true
+      next A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A
+    end
+  end
+end
+
+assert('negate literal register alignment') do
+  a = *case
+  when 0
+    -0.0
+    2
+  end
+
+  assert_equal [2], a
+end
Index: EcnlProtoTool/trunk/mruby-1.3.0/test/t/exception.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/exception.rb	(revision 321)
+++ EcnlProtoTool/trunk/mruby-1.3.0/test/t/exception.rb	(revision 331)
@@ -339,8 +339,11 @@
         1 * "b"
       ensure
-        @e = self.z
-      end
-    end
-
+        @e = self.zz
+      end
+    end
+
+    def zz
+      true
+    end
     def z
       true
@@ -351,5 +354,5 @@
 
 assert('Exception#inspect without message') do
-  assert_equal "Exception: Exception", Exception.new.inspect
+  assert_equal "Exception", Exception.new.inspect
 end
 
@@ -374,11 +377,46 @@
 end
 
-assert('Raise in rescue') do
-  assert_raise(ArgumentError) do
-    begin
-      raise "" # RuntimeError
-    rescue
-      raise ArgumentError
-    end
-  end
-end
+def backtrace_available?
+  begin
+    raise "XXX"
+  rescue => exception
+    not exception.backtrace.empty?
+  end
+end
+
+assert('GC in rescue') do
+  skip "backtrace isn't available" unless backtrace_available?
+
+  line = nil
+  begin
+    [1].each do
+      [2].each do
+        [3].each do
+          line = __LINE__; raise "XXX"
+        end
+      end
+    end
+  rescue => exception
+    GC.start
+    assert_equal("#{__FILE__}:#{line}:in call",
+                 exception.backtrace.first)
+  end
+end
+
+assert('Method call in rescue') do
+  skip "backtrace isn't available" unless backtrace_available?
+
+  line = nil
+  begin
+    [1].each do
+      [2].each do
+        line = __LINE__; raise "XXX"
+      end
+    end
+  rescue => exception
+    [3].each do
+    end
+    assert_equal("#{__FILE__}:#{line}:in call",
+                 exception.backtrace.first)
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.3.0/test/t/float.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/float.rb	(revision 321)
+++ EcnlProtoTool/trunk/mruby-1.3.0/test/t/float.rb	(revision 331)
@@ -149,4 +149,7 @@
 assert('Float#to_i', '15.2.9.3.14') do
   assert_equal(3, 3.123456789.to_i)
+  assert_raise(FloatDomainError) { Float::INFINITY.to_i }
+  assert_raise(FloatDomainError) { (-Float::INFINITY).to_i }
+  assert_raise(FloatDomainError) { Float::NAN.to_i }
 end
 
Index: EcnlProtoTool/trunk/mruby-1.3.0/test/t/hash.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/hash.rb	(revision 321)
+++ EcnlProtoTool/trunk/mruby-1.3.0/test/t/hash.rb	(revision 331)
@@ -17,4 +17,11 @@
 
   assert_equal 'abc', a['abc']
+
+  # Hash#[] should call #default (#3272)
+  hash = {}
+  def hash.default(k); self[k] = 1; end
+  hash[:foo] += 1
+
+  assert_equal 2, hash[:foo]
 end
 
@@ -38,4 +45,8 @@
   a['a'] = 2
   assert_equal({'a' => 1}, b)
+
+  c = Hash.new { |h, k| h[k] = k.upcase }
+  d = c.dup
+  assert_equal("FOO", d["foo"])
 end
 
@@ -240,4 +251,8 @@
   b.replace(a)
   assert_equal(127, b[127])
+
+   assert_raise(TypeError) do
+    { 'abc_key' => 'abc_value' }.replace "a"
+  end
 end
 
@@ -352,2 +367,9 @@
   assert_equal("b", h[[:b]])
 end
+
+assert('Hash#freeze') do
+  h = {}.freeze
+  assert_raise(RuntimeError) do
+    h[:a] = 'b'
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.3.0/test/t/integer.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/integer.rb	(revision 321)
+++ EcnlProtoTool/trunk/mruby-1.3.0/test/t/integer.rb	(revision 331)
@@ -148,4 +148,10 @@
   # Left Shift by a negative is Right Shift
   assert_equal 23, 46 << -1
+
+  # Left Shift by 31 is bitShift overflow to SignedInt
+  assert_equal 2147483648, 1 << 31
+
+  # -3 Left Shift by 30 is bitShift overflow to SignedInt
+  assert_equal(-3221225472, -3 << 30)
 end
 
Index: EcnlProtoTool/trunk/mruby-1.3.0/test/t/kernel.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/kernel.rb	(revision 321)
+++ EcnlProtoTool/trunk/mruby-1.3.0/test/t/kernel.rb	(revision 331)
@@ -222,4 +222,12 @@
 end
 
+assert('Kernel#dup class') do
+  assert_nothing_raised do
+    Array.dup.new(200)
+    Range.dup.new(2, 3)
+    String.dup.new("a"*50)
+  end
+end
+
 # Kernel#eval is provided by mruby-eval mrbgem '15.3.1.3.12'
 
@@ -248,4 +256,11 @@
 
   assert_true respond_to?(:test_method)
+end
+
+assert('Kernel#freeze') do
+  obj = Object.new
+  assert_equal obj, obj.freeze
+  assert_equal 0, 0.freeze
+  assert_equal :a, :a.freeze
 end
 
@@ -424,4 +439,9 @@
 assert('Kernel#public_methods', '15.3.1.3.38') do
   assert_equal Array, public_methods.class
+  class Foo
+    def foo
+    end
+  end
+  assert_equal [:foo], Foo.new.public_methods(false)
 end
 
@@ -508,4 +528,19 @@
 end
 
+assert('Kernel#to_s on primitives') do
+  begin
+    Fixnum.alias_method :to_s_, :to_s
+    Fixnum.remove_method :to_s
+
+    assert_nothing_raised do
+      # segfaults if mrb_cptr is used
+      1.to_s
+    end
+  ensure
+    Fixnum.alias_method :to_s, :to_s_
+    Fixnum.remove_method :to_s_
+  end
+end
+
 assert('Kernel.local_variables', '15.3.1.2.7') do
   a, b = 0, 1
@@ -515,9 +550,8 @@
   assert_equal [:a, :b, :vars], vars
 
-  Proc.new {
+  assert_equal [:a, :b, :c, :vars], Proc.new { |a, b|
     c = 2
-    vars = Kernel.local_variables.sort
-    assert_equal [:a, :b, :c, :vars], vars
-  }.call
+    Kernel.local_variables.sort
+  }.call(-1, -2)
 end
 
@@ -588,3 +622,2 @@
   assert_equal 6, recurse(0, 5)
 end
-
Index: EcnlProtoTool/trunk/mruby-1.3.0/test/t/lang.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.3.0/test/t/lang.rb	(revision 331)
+++ EcnlProtoTool/trunk/mruby-1.3.0/test/t/lang.rb	(revision 331)
@@ -0,0 +1,74 @@
+# The aim of these tests is  to detect pitfall for optimized VM.
+
+# Test for or/and
+#
+# You may think instruction fusion(OP_EQ and OP_JMPIF) for avoiding
+# generate intermediate boolean value.
+# But and/or is pitfall for this fusioning.
+#
+# For example, the following mruby code:
+#
+#   if i > 0 and i < 10 then
+#
+# compiles to the following byte code:
+#
+#    1 000 OP_LOADI      R1      0               ; R1:i
+#    2 001 OP_MOVE       R2      R1              ; R1:i
+#    2 002 OP_LOADI      R3      0
+#    2 003 OP_GT R2      :>      1
+#    2 004 OP_JMPNOT     R2      008
+#    2 005 OP_MOVE       R2      R1              ; R1:i
+#    2 006 OP_LOADI      R3      10
+#    2 007 OP_LT R2      :<      1
+#    2 008 OP_JMPNOT     R2      (The address of end of then part)
+#
+# When the instruction fusion the OP_GT and OP_JMPNOT you fell into the pitfalls.
+# The deleted intermediate boolean value is used in OP_JMPNOT (address 008).
+
+assert('and', '11.2.3') do
+  a = 1
+  if a > 0 and a < 10 then
+    b = 1
+  else
+    b = 0
+  end
+  assert_equal 1, b
+
+  if a < 0 and a < 10 then
+    b = 1
+  else
+    b = 0
+  end
+  assert_equal 0, b
+
+  if a < 0 and a > 10 then
+    b = 1
+  else
+    b = 0
+  end
+  assert_equal 0, b
+end
+
+assert('or','11.2.4') do
+  a = 1
+  if a > 0 or a < 10 then
+    b = 1
+  else
+    b = 0
+  end
+  assert_equal 1, b
+
+  if a < 0 or a < 10 then
+    b = 1
+  else
+    b = 0
+  end
+  assert_equal 1, b
+
+  if a < 0 or a > 10 then
+    b = 1
+  else
+    b = 0
+  end
+  assert_equal 0, b
+end
Index: EcnlProtoTool/trunk/mruby-1.3.0/test/t/literals.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/literals.rb	(revision 321)
+++ EcnlProtoTool/trunk/mruby-1.3.0/test/t/literals.rb	(revision 331)
@@ -27,5 +27,5 @@
   assert_equal       10, 1_0
   # integer with exponent
-  assert_equal 10.0, 1e1,
+  assert_equal 10.0, 1e1
   assert_equal(0.1, 1e-1)
   assert_equal 10.0, 1e+1
Index: EcnlProtoTool/trunk/mruby-1.3.0/test/t/module.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/module.rb	(revision 321)
+++ EcnlProtoTool/trunk/mruby-1.3.0/test/t/module.rb	(revision 331)
@@ -494,4 +494,16 @@
 
 # Not ISO specified
+
+assert('Module#define_method') do
+  c = Class.new {
+    define_method(:m1) { :ok }
+    define_method(:m2, Proc.new { :ok })
+  }
+  assert_equal c.new.m1, :ok
+  assert_equal c.new.m2, :ok
+  assert_raise(TypeError) do
+    Class.new { define_method(:n1, nil) }
+  end
+end
 
 # @!group prepend
@@ -838,2 +850,13 @@
   assert_raise(TypeError) { module []::M2 end }
 end
+
+assert('get constant of parent module in singleton class; issue #3568') do
+  actual = module GetConstantInSingletonTest
+    EXPECTED = "value"
+    class << self
+      EXPECTED
+    end
+  end
+
+  assert_equal("value", actual)
+end
Index: EcnlProtoTool/trunk/mruby-1.3.0/test/t/nil.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/nil.rb	(revision 321)
+++ EcnlProtoTool/trunk/mruby-1.3.0/test/t/nil.rb	(revision 331)
@@ -33,2 +33,7 @@
   assert_equal '', nil.to_s
 end
+
+assert('safe navigation') do
+  assert_nil nil&.size
+  assert_equal 0, []&.size
+end
Index: EcnlProtoTool/trunk/mruby-1.3.0/test/t/proc.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/proc.rb	(revision 321)
+++ EcnlProtoTool/trunk/mruby-1.3.0/test/t/proc.rb	(revision 331)
@@ -137,4 +137,16 @@
 end
 
+assert('call Proc#initialize if defined') do
+  a = []
+  c = Class.new(Proc) do
+    define_method(:initialize) do
+      a << :ok
+    end
+  end
+
+  assert_kind_of c, c.new{}
+  assert_equal [:ok], a
+end
+
 assert('&obj call to_proc if defined') do
   pr = Proc.new{}
Index: EcnlProtoTool/trunk/mruby-1.3.0/test/t/range.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/range.rb	(revision 321)
+++ EcnlProtoTool/trunk/mruby-1.3.0/test/t/range.rb	(revision 331)
@@ -44,8 +44,9 @@
 
 assert('Range#include?', '15.2.14.4.8') do
-  a = (1..10)
+  assert_true (1..10).include?(10)
+  assert_false (1..10).include?(11)
 
-  assert_true a.include?(5)
-  assert_false a.include?(20)
+  assert_true (1...10).include?(9)
+  assert_false (1...10).include?(10)
 end
 
@@ -58,4 +59,6 @@
   assert_equal (1..10), b
   assert_false b.exclude_end?
+
+  assert_raise(NameError) { (0..1).send(:initialize, 1, 3) }
 end
 
Index: EcnlProtoTool/trunk/mruby-1.3.0/test/t/string.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/string.rb	(revision 321)
+++ EcnlProtoTool/trunk/mruby-1.3.0/test/t/string.rb	(revision 331)
@@ -252,4 +252,17 @@
 end
 
+assert('String#chomp! uses the correct length') do
+  class A
+    def to_str
+      $s.replace("AA")
+      "A"
+    end
+  end
+
+  $s = "AAA"
+  $s.chomp!(A.new)
+  assert_equal $s, "A"
+end
+
 assert('String#chop', '15.2.10.5.11') do
   a = ''.chop
@@ -329,4 +342,10 @@
 
   assert_equal list, n_list
+
+  n_list.clear
+  a.each_line("li") do |line|
+    n_list << line
+  end
+  assert_equal ["first li", "ne\nsecond li", "ne\nthird li", "ne"], n_list
 end
 
@@ -353,4 +372,11 @@
   assert_equal('A',      'a'.gsub('a', 'A'))
   assert_equal('A',      'a'.gsub('a'){|w| w.capitalize })
+  assert_equal("<a><><>", 'a'.gsub('a', '<\0><\1><\2>'))
+  assert_equal(".h.e.l.l.o.", "hello".gsub("", "."))
+  a = []
+  assert_equal(".h.e.l.l.o.", "hello".gsub("") { |i| a << i; "." })
+  assert_equal(["", "", "", "", "", ""], a)
+  assert_raise(ArgumentError) { "".gsub }
+  assert_raise(ArgumentError) { "".gsub("", "", "") }
 end
 
@@ -382,6 +408,4 @@
 
 assert('String#include?', '15.2.10.5.21') do
-  assert_true 'abc'.include?(97)
-  assert_false 'abc'.include?(100)
   assert_true 'abc'.include?('a')
   assert_false 'abc'.include?('d')
@@ -392,4 +416,6 @@
   assert_nil 'abc'.index('d')
   assert_equal 3, 'abcabc'.index('a', 1)
+  assert_equal 5, "hello".index("", 5)
+  assert_equal nil, "hello".index("", 6)
 end
 
@@ -560,4 +586,14 @@
   assert_equal 'aBcabc', 'abcabc'.sub('b') { |w| w.capitalize }
   assert_equal 'aa$', 'aa#'.sub('#', '$')
+  assert_equal '.abc', "abc".sub("", ".")
+
+  str = "abc"
+  miss = str.sub("X", "Z")
+  assert_equal str, miss
+  assert_not_equal str.object_id, miss.object_id
+
+  a = []
+  assert_equal '.abc', "abc".sub("") { |i| a << i; "." }
+  assert_equal [""], a
 end
 
@@ -586,8 +622,12 @@
   b = '123456789'.to_f
   c = '12345.6789'.to_f
+  d = '1e-2147483648'.to_f
+  e = '1e2147483648'.to_f
 
   assert_float(0.0, a)
   assert_float(123456789.0, b)
   assert_float(12345.6789, c)
+  assert_float(0, d)
+  assert_float(Float::INFINITY, e)
 end
 
@@ -686,3 +726,2 @@
   assert_raise(RuntimeError) { str.upcase! }
 end
-
Index: EcnlProtoTool/trunk/mruby-1.3.0/test/t/symbol.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/symbol.rb	(revision 321)
+++ EcnlProtoTool/trunk/mruby-1.3.0/test/t/symbol.rb	(revision 331)
@@ -1,4 +1,11 @@
 ##
 # Symbol ISO Test
+
+assert('Symbol') do
+  assert_equal :"a", :a
+  assert_equal :"a#{1}", :a1
+  assert_equal :'a', :a
+  assert_equal :'a#{1}', :"a\#{1}"
+end
 
 assert('Symbol', '15.2.11') do
Index: EcnlProtoTool/trunk/mruby-1.3.0/test/t/syntax.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/syntax.rb	(revision 321)
+++ EcnlProtoTool/trunk/mruby-1.3.0/test/t/syntax.rb	(revision 331)
@@ -39,4 +39,24 @@
     yield
   end
+  assert_raise LocalJumpError do
+    o = Object.new
+    def o.foo
+      yield
+    end
+    o.foo
+  end
+end
+
+assert('redo in a for loop (#3275)') do
+  sum = 0
+  for i in 1..10
+    sum += i
+    i -= 1
+    if i > 0
+      redo
+    end
+  end
+
+  assert_equal 220, sum
 end
 
@@ -249,4 +269,11 @@
 end
 
+assert('multiple assignment (empty array rhs #3236, #3239)') do
+  a,b,*c = []; assert_equal [nil, nil, []], [a, b, c]
+  a,b,*c = [1]; assert_equal [1, nil, []], [a, b, c]
+  a,b,*c = [nil]; assert_equal [nil,nil, []], [a, b, c]
+  a,b,*c = [[]]; assert_equal [[], nil, []], [a, b, c]
+end
+
 assert('Return values of case statements') do
   a = [] << case 1
@@ -299,4 +326,34 @@
 
   assert_equal 1, when_value
+end
+
+assert('splat object in assignment') do
+  o = Object.new
+  def o.to_a
+    nil
+  end
+  assert_equal [o], (a = *o)
+
+  def o.to_a
+    1
+  end
+  assert_raise(TypeError) { a = *o }
+
+  def o.to_a
+    [2]
+  end
+  assert_equal [2], (a = *o)
+end
+
+assert('splat object in case statement') do
+  o = Object.new
+  def o.to_a
+    nil
+  end
+  a = case o
+  when *o
+    1
+  end
+  assert_equal 1, a
 end
 
@@ -325,5 +382,5 @@
 
 assert('External command execution.') do
-  class << Kernel
+  module Kernel
     sym = '`'.to_sym
     alias_method :old_cmd, sym
Index: EcnlProtoTool/trunk/mruby-1.3.0/test/t/unicode.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/unicode.rb	(revision 321)
+++ EcnlProtoTool/trunk/mruby-1.3.0/test/t/unicode.rb	(revision 331)
@@ -3,14 +3,14 @@
 assert('bare \u notation test') do
   # Mininum and maximum one byte characters
-  assert_equal("\u0000", "\x00")
-  assert_equal("\u007F", "\x7F")
+  assert_equal("\x00", "\u0000")
+  assert_equal("\x7F", "\u007F")
 
   # Mininum and maximum two byte characters
-  assert_equal("\u0080", "\xC2\x80")
-  assert_equal("\u07FF", "\xDF\xBF")
+  assert_equal("\xC2\x80", "\u0080")
+  assert_equal("\xDF\xBF", "\u07FF")
 
   # Mininum and maximum three byte characters
-  assert_equal("\u0800", "\xE0\xA0\x80")
-  assert_equal("\uFFFF", "\xEF\xBF\xBF")
+  assert_equal("\xE0\xA0\x80", "\u0800")
+  assert_equal("\xEF\xBF\xBF", "\uFFFF")
 
   # Four byte characters require the \U notation
@@ -19,17 +19,21 @@
 assert('braced \u notation test') do
   # Mininum and maximum one byte characters
-  assert_equal("\u{0000}", "\x00")
-  assert_equal("\u{007F}", "\x7F")
+  assert_equal("\x00", "\u{0000}")
+  assert_equal("\x7F", "\u{007F}")
 
   # Mininum and maximum two byte characters
-  assert_equal("\u{0080}", "\xC2\x80")
-  assert_equal("\u{07FF}", "\xDF\xBF")
+  assert_equal("\xC2\x80", "\u{0080}")
+  assert_equal("\xDF\xBF", "\u{07FF}")
 
   # Mininum and maximum three byte characters
-  assert_equal("\u{0800}", "\xE0\xA0\x80")
-  assert_equal("\u{FFFF}", "\xEF\xBF\xBF")
+  assert_equal("\xE0\xA0\x80", "\u{0800}")
+  assert_equal("\xEF\xBF\xBF", "\u{FFFF}")
 
   # Mininum and maximum four byte characters
-  assert_equal("\u{10000}",  "\xF0\x90\x80\x80")
-  assert_equal("\u{10FFFF}", "\xF4\x8F\xBF\xBF")
+  assert_equal("\xF0\x90\x80\x80", "\u{10000}")
+  assert_equal("\xF4\x8F\xBF\xBF", "\u{10FFFF}")
 end
+
+assert('braced multiple \u notation test') do
+  assert_equal("ABC", "\u{41 42 43}")
+end
