Skip to content

Commit

Permalink
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -674,23 +674,23 @@ public InitializeNode(InitializeNode prev) {

@Specialization
public RubyHash initialize(RubyHash hash, UndefinedPlaceholder defaultValue, UndefinedPlaceholder block) {
notDesignedForCompilation();
hash.setStore(null, 0, null, null);
hash.setDefaultBlock(null);

This comment has been minimized.

Copy link
@eregon

eregon Mar 9, 2015

Member

Same here.

hash.setDefaultBlock(null);
return hash;
}

@Specialization
public RubyHash initialize(RubyHash hash, UndefinedPlaceholder defaultValue, RubyProc block) {
notDesignedForCompilation();
hash.setStore(null, 0, null, null);
hash.setDefaultBlock(null);
hash.setDefaultBlock(block);

This comment has been minimized.

Copy link
@eregon

eregon Mar 9, 2015

Member

These 2 looks weird (and above).

This comment has been minimized.

Copy link
@chrisseaton

chrisseaton Mar 9, 2015

Author Contributor

Oh yeah that should be setDefaultValue. Thanks.

return hash;
}

@Specialization(guards = "!isUndefinedPlaceholder(arguments[1])")
public RubyHash initialize(RubyHash hash, Object defaultValue, UndefinedPlaceholder block) {
notDesignedForCompilation();
hash.setStore(null, 0, null, null);
hash.setDefaultValue(defaultValue);
hash.setDefaultBlock(null);
return hash;

0 comments on commit 8c3f7f3

Please sign in to comment.