erlang_rb 1.7.2 → 1.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 840879a6cfbce7f6edd7121da5e14b7ae19d87d8
4
- data.tar.gz: 20c7c183a75f632da0b2c11979f969ef4eee22e2
3
+ metadata.gz: f8f78fa94a8ae343895ffb2e60fe42d89eb7fed2
4
+ data.tar.gz: 10c4f25439b19a7c1fad2d4b619b649f91ed60f5
5
5
  SHA512:
6
- metadata.gz: d5966d24eaf1b950e3e52124a0d1780291d1ec497a6c913df0ca68e52ea56b29710a9fac0710c0e54d7e4021d0c532ec62b2db1b386575ad2d64024649420dab
7
- data.tar.gz: '06872cf36314730369b5e1f0606010d58254826861a7e9048283efc95fe105f5e1dfe116713cc4354678f5a311fa393c65a8ef44cd18cabe504fb5d79254e96e'
6
+ metadata.gz: 36d5d7abb77b099895f7428da4dc5091daf40798a6de1460cec0beea822987c32b0a3ab075e8b54a5fbd921deb7cfd2448a9bd549dd9481825ba90e6412420d5
7
+ data.tar.gz: 74a39aefaf67ea8a163b404c591d655a1766d208656a680a898c24ccd977bd74ca8e9d8f8c64ef182c2becaa0356965964294a496cefe8214e69309312bd2ad3
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/erlang.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # MIT License
5
5
  #
6
- # Copyright (c) 2011-2017 Michael Truog <mjtruog at gmail dot com>
6
+ # Copyright (c) 2011-2018 Michael Truog <mjtruog at gmail dot com>
7
7
  #
8
8
  # Permission is hereby granted, free of charge, to any person obtaining a
9
9
  # copy of this software and associated documentation files (the "Software"),
@@ -644,6 +644,10 @@ module Erlang
644
644
  return OtpErlangAtom.new(
645
645
  'false'.force_encoding('ISO-8859-1')
646
646
  ).binary
647
+ elsif term.nil?
648
+ return OtpErlangAtom.new(
649
+ 'undefined'.force_encoding('ISO-8859-1')
650
+ ).binary
647
651
  elsif term.kind_of?(OtpErlangAtom)
648
652
  return term.binary
649
653
  elsif term.kind_of?(OtpErlangList)
@@ -4,7 +4,7 @@
4
4
  #
5
5
  # MIT License
6
6
  #
7
- # Copyright (c) 2014-2017 Michael Truog <mjtruog at gmail dot com>
7
+ # Copyright (c) 2014-2018 Michael Truog <mjtruog at gmail dot com>
8
8
  # Copyright (c) 2009-2013 Dmitry Vasiliev <dima@hlabs.org>
9
9
  #
10
10
  # Permission is hereby granted, free of charge, to any person obtaining a
@@ -524,9 +524,10 @@ class EncodeTestCase < Test::Unit::TestCase
524
524
  assert_equal("\x83k\0\4test",
525
525
  Erlang::term_to_binary('test'))
526
526
  end
527
- def test_term_to_binary_boolean
527
+ def test_term_to_binary_predefined_atom
528
528
  assert_equal("\x83s\4true", Erlang::term_to_binary(true))
529
529
  assert_equal("\x83s\5false", Erlang::term_to_binary(false))
530
+ assert_equal("\x83s\x09undefined", Erlang::term_to_binary(nil))
530
531
  end
531
532
  def test_term_to_binary_short_integer
532
533
  assert_equal("\x83a\0", Erlang::term_to_binary(0))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: erlang_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.2
4
+ version: 1.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Truog
@@ -30,7 +30,7 @@ cert_chain:
30
30
  +H4JAL4xk2aIYYf48338kxyZ8y9BNgp8cGbMEDtRSCgJnYk820Yt/fhM2DZtCbBL
31
31
  tOEdFrZvpA23/sCoGvunHw==
32
32
  -----END CERTIFICATE-----
33
- date: 2017-09-12 00:00:00.000000000 Z
33
+ date: 2018-02-26 00:00:00.000000000 Z
34
34
  dependencies: []
35
35
  description: Erlang Binary Term Format for Ruby
36
36
  email: mjtruog@gmail.com
metadata.gz.sig CHANGED
Binary file