packable 1.3.15 → 1.3.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 418f5bd7ae865a2e8151c16e2916312e03abf93f49dce4bdc2f66ca9da4780fb
4
- data.tar.gz: a1ed515518e37f91ce739252fa2fbd049521c882b20daccf5fc77e4d3a349f28
3
+ metadata.gz: '079bee07c155c491f4e3d89b452941f1cc820c06991cc674f392f92299e2aefa'
4
+ data.tar.gz: d0f0f2dd14977ff2c25cda2c002d9ef4494b412f408163d304fb62df097e3629
5
5
  SHA512:
6
- metadata.gz: a2fa7f4ed5881242241af1ba2606454c191ca3d6ab62f87ac7aac387920acaee28db40b9e6fa7ecbe6f92e8ab9c46f098dade847202269b9b80fbfd187d2cadd
7
- data.tar.gz: 384ceca250f03b854c212376956e763655029719fe4c970ac8ef70749d1a8662f59230329b8994714fbdb25ed8932f79b918c4b72e610090090fe8bee5c53f3c
6
+ metadata.gz: bf4f13415f595250c28fa03567fae69407b9b4ef97b3b2873d5b0cb05286cbd05c2454880b183b2f8bd337069ac5cbb016fb922956d45b07b562da024c7a1e55
7
+ data.tar.gz: 0eaf9e7ed8214380a8767dafe4d139787819a3019ae1376ee78165a00aff70a9cc034dad01167e4ac95c542f7fc7b514b68c9d338a7757a4de8338ef76d07814
@@ -5,7 +5,8 @@ module Packable
5
5
  module Array #:nodoc:
6
6
  def self.included(base)
7
7
  base.class_eval do
8
- alias_method_chain :pack, :long_form
8
+ alias_method :pack_without_long_form, :pack
9
+ alias_method :pack, :pack_with_long_form
9
10
  include Packable
10
11
  extend ClassMethods
11
12
  end
@@ -5,9 +5,12 @@ module Packable
5
5
  module Extensions #:nodoc:
6
6
  module IO
7
7
  def self.included(base) #:nodoc:
8
- base.alias_method_chain :read, :packing
9
- base.alias_method_chain :write, :packing
10
- base.alias_method_chain :each, :packing
8
+ base.__send__(:alias_method, :read_without_packing, :read)
9
+ base.__send__(:alias_method, :read, :read_with_packing)
10
+ base.__send__(:alias_method, :write_without_packing, :write)
11
+ base.__send__(:alias_method, :write, :write_with_packing)
12
+ base.__send__(:alias_method, :each_without_packing, :each)
13
+ base.__send__(:alias_method, :each, :each_with_packing)
11
14
  end
12
15
 
13
16
  # Methods supported by seekable streams.
@@ -8,7 +8,8 @@ module Packable
8
8
  base.class_eval do
9
9
  include Packable
10
10
  extend ClassMethods
11
- alias_method_chain :unpack, :long_form
11
+ alias_method :unpack_without_long_form, :unpack
12
+ alias_method :unpack, :unpack_with_long_form
12
13
  packers.set :merge_all, :fill => " "
13
14
  end
14
15
  end
@@ -1,3 +1,3 @@
1
1
  module Packable
2
- VERSION = '1.3.15'
2
+ VERSION = '1.3.17'
3
3
  end
data/lib/packable.rb CHANGED
@@ -1,6 +1,4 @@
1
1
  require "packable/version"
2
- require 'backports/tools/alias_method_chain'
3
- require 'backports/rails/module'
4
2
  require_relative 'packable/packers'
5
3
  require_relative 'packable/mixin'
6
4
  [Object, Array, String, Integer, Float, IO, Proc].each do |klass|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: packable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.15
4
+ version: 1.3.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc-André Lafortune
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-25 00:00:00.000000000 Z
11
+ date: 2023-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: backports
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  - !ruby/object:Gem::Version
115
115
  version: '0'
116
116
  requirements: []
117
- rubygems_version: 3.2.3
117
+ rubygems_version: 3.4.1
118
118
  signing_key:
119
119
  specification_version: 4
120
120
  summary: Extensive packing and unpacking capabilities