Skip to content
This repository has been archived by the owner on Sep 14, 2018. It is now read-only.

Commit

Permalink
https://ironruby.codeplex.com/workitem/7406
Browse files Browse the repository at this point in the history
Added default constructor for Encoding (mainly for Marshal.load).
  • Loading branch information
ife committed Jun 20, 2014
1 parent 6aa3e22 commit 668708a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Languages/Ruby/Ruby/Builtins/RubyEncoding.cs
Expand Up @@ -92,7 +92,15 @@ public class RubyEncoding : ISerializable, IExpressionSerializable {
_strictEncoding = strictEncoding;
_maxBytesPerChar = strictEncoding.GetMaxByteCount(1);
_isAsciiIdentity = AsciiIdentity(encoding);
}
}

/// <summary>
/// Default construtor (ASCII)
/// MEMO: exists mainly for Marshal.load.
/// </summary>
protected RubyEncoding()
: this(CreateEncoding(CodePageAscii, false), CreateEncoding(CodePageAscii, true), -2) {
}

public override int GetHashCode() {
return _ordinal;
Expand Down

0 comments on commit 668708a

Please sign in to comment.