[macruby-changes] [MacRuby/MacRuby] b87068: fix a bug in `undef' which it could call undefined...

GitHub noreply at github.com
Sun May 19 17:33:38 PDT 2013


  Branch: refs/heads/master
  Home:   https://github.com/MacRuby/MacRuby
  Commit: b870681b35e057bcfe7b22143e924c09fca5a274
      https://github.com/MacRuby/MacRuby/commit/b870681b35e057bcfe7b22143e924c09fca5a274
  Author: Watson <watson1978 at gmail.com>
  Date:   2013-05-19 (Sun, 19 May 2013)

  Changed paths:
    M vm.cpp

  Log Message:
  -----------
  fix a bug in `undef' which it could call undefined method if call it once

Test Code:
----
class Foo
  def meth
  end
end

obj = Foo.new
obj.meth

class Foo
  undef meth
end
p obj.meth

Result:
----
$ macruby test_undef.rb
nil

Expected:
----
ruby test_undef.rb
test_undef.rb:12:in `<main>': undefined method `meth' for #<Foo:0x007f8231935d18> (NoMethodError)


  Commit: 4c066464948bbae215251538397d654ab3bad021
      https://github.com/MacRuby/MacRuby/commit/4c066464948bbae215251538397d654ab3bad021
  Author: Watson <watson1978 at gmail.com>
  Date:   2013-05-19 (Sun, 19 May 2013)

  Changed paths:
    M vm.cpp

  Log Message:
  -----------
  fix a bug in Module#remove_method which it could call undefined method if call it once

Test Code:
----
class Foo
  def meth
  end
end

obj = Foo.new
obj.meth

class Foo
  remove_method :meth
end
p obj.meth

Result:
----
$ macruby test_remove.rb
nil

Expected:
----
$ ruby test_remove.rb
test_remove.rb:12:in `<main>': undefined method `meth' for #<Foo:0x007fad558b9cc8> (NoMethodError)


  Commit: 1e91fde510c3a94fb7eb896b42ab9002fdcbd38b
      https://github.com/MacRuby/MacRuby/commit/1e91fde510c3a94fb7eb896b42ab9002fdcbd38b
  Author: Watson <watson1978 at gmail.com>
  Date:   2013-05-19 (Sun, 19 May 2013)

  Changed paths:
    R spec/frozen/tags/macruby/core/module/undef_method_tags.txt
    R spec/frozen/tags/macruby/language/undef_tags.txt

  Log Message:
  -----------
  update spec's tag


Compare: https://github.com/MacRuby/MacRuby/compare/55f633ce48f5...1e91fde510c3


More information about the macruby-changes mailing list