diff --git a/shard.yml b/shard.yml index 8a30e18..ee93f7d 100644 --- a/shard.yml +++ b/shard.yml @@ -1,5 +1,5 @@ name: bindata -version: 1.9.0 +version: 1.9.1 crystal: ">= 1.0.0" development_dependencies: diff --git a/src/bindata.cr b/src/bindata.cr index a909572..88bdd7e 100644 --- a/src/bindata.cr +++ b/src/bindata.cr @@ -408,7 +408,7 @@ abstract class BinData {% end %} def {{name.var}} : {{name.type}} - {{name.type}}.from_value(@{{name.var}}.to_i) + {{name.type}}.new(@{{name.var}}.to_i) end def {{name.var}}=(value : {{name.type}}) diff --git a/src/bindata/asn1.cr b/src/bindata/asn1.cr index 2a477dd..d41a5b4 100644 --- a/src/bindata/asn1.cr +++ b/src/bindata/asn1.cr @@ -43,7 +43,7 @@ module ASN1 def tag raise "only valid for universal tags" unless tag_class == TagClass::Universal - UniversalTags.from_value tag_number + UniversalTags.new tag_number.to_i end def extended? @@ -101,7 +101,7 @@ module ASN1 # Check if this can be expanded into multiple sub-entries def sequence? return false unless tag_class == TagClass::Universal - tag = UniversalTags.from_value tag_number + tag = UniversalTags.new tag_number.to_i constructed && {UniversalTags::Sequence, UniversalTags::Set}.includes?(tag) end