Skip to content

Commit

Permalink
[Truffle] Allow nil.extend to work.
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvdrum committed May 15, 2015
1 parent 5ed91b4 commit 617ce76
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion truffle/src/main/ruby/core/rubinius/common/kernel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ def define_singleton_method(*args, &block)

def extend(*modules)
raise ArgumentError, "wrong number of arguments (0 for 1+)" if modules.empty?
Rubinius.check_frozen

# Disabled for JRuby+Truffle. The frozen check should be done in `object_extend`.
# Having the check here breaks nil.extend().
#Rubinius.check_frozen

modules.reverse_each do |mod|
Rubinius.privately do
Expand Down

0 comments on commit 617ce76

Please sign in to comment.