Skip to content
Browse files

Maglev does not support untrust. fix Module#methods(false)

  • Loading branch information...
1 parent b6a5c37 commit af1945761d7eda99229bb769a628c22c465d3a27 @timfel timfel committed
Showing with 3 additions and 8 deletions.
  1. +0 −5 spec/tags/core/class/dup_tags.txt
  2. +2 −2 src/kernel/bootstrap/Module.rb
  3. +1 −1 src/kernel/delta/Module.rb
View
5 spec/tags/core/class/dup_tags.txt
@@ -1,6 +1 @@
-fails:Class#dup duplicates both the class and the singleton class
-fails:Class#dup retains the correct ancestor chain for the singleton class
fails:Class#dup sets the name from the class to "" if not assigned to a constant
-fails:Class#dup stores the new name if assigned to a constant
-fails:Class#dup retains an included module in the ancestor chain for the singleton class
-fails:Class#dup sets the name from the class to nil if not assigned to a constant
View
4 src/kernel/bootstrap/Module.rb
@@ -281,7 +281,7 @@ def __internal_clone
def dup
duplicate = __internal_clone
duplicate.taint if self.tainted?
- duplicate.untrust if self.untrusted?
+ # duplicate.untrust if self.untrusted? # Not supported on MagLev
duplicate.initialize_dup(self)
duplicate
end
@@ -290,7 +290,7 @@ def clone
duplicate = __internal_clone
duplicate.freeze if self.frozen? # only in clone, not in dup
duplicate.taint if self.tainted?
- duplicate.untrust if self.untrusted?
+ # duplicate.untrust if self.untrusted? # Not supported on MagLev
duplicate.initialize_clone(self)
duplicate
end
View
2 src/kernel/delta/Module.rb
@@ -28,7 +28,7 @@ def include?(other)
primitive '__ruby_instance_methods', 'rubyInstanceMethods:protection:'
def methods(regular = true)
- set = self.__ruby_singleton_methods(false, -1) # include protected meths
+ set = self.__ruby_methods(false, -1) # include protected meths
if regular
set = set + self.__ruby_methods(true, -1) # include protected meths
end

0 comments on commit af19457

Please sign in to comment.
Something went wrong with that request. Please try again.