From 3ccacfaab9b95eaba158b2fe413cda52c6e154c4 Mon Sep 17 00:00:00 2001 From: Holger Just Date: Thu, 27 Apr 2017 23:47:51 +0200 Subject: [PATCH] Move DEFAULT_OBJ_ID_STR_WIDTH to Rackstash module --- lib/rackstash.rb | 4 ++++ lib/rackstash/fields/abstract_collection.rb | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/rackstash.rb b/lib/rackstash.rb index 34b2780..e183c18 100644 --- a/lib/rackstash.rb +++ b/lib/rackstash.rb @@ -47,6 +47,10 @@ module Rackstash FIELD_TAGS = 'tags'.freeze FIELD_TIMESTAMP = '@timestamp'.freeze FIELD_VERSION = '@version'.freeze + + # @!visibility private + # we want to look "native" with our inspect values, 7 for 32-bit, 14 for 64-bit + DEFAULT_OBJ_ID_STR_WIDTH = 0.size == 4 ? 7 : 14 end require 'rackstash/logger' diff --git a/lib/rackstash/fields/abstract_collection.rb b/lib/rackstash/fields/abstract_collection.rb index 3a9d424..f897f80 100644 --- a/lib/rackstash/fields/abstract_collection.rb +++ b/lib/rackstash/fields/abstract_collection.rb @@ -12,10 +12,6 @@ require 'concurrent' module Rackstash module Fields class AbstractCollection - # @!visibility private - # we want to look "native", 7 for 32-bit, 14 for 64-bit - DEFAULT_OBJ_ID_STR_WIDTH = 0.size == 4 ? 7 : 14 - # Equality -- Two collections are equal if they are of exactly the same # class and contain the same raw data according to `Object#==`. #