lib/timber/contexts/system.rb in timber-2.1.1 vs lib/timber/contexts/system.rb in timber-2.1.2
- old
+ new
@@ -13,15 +13,15 @@
attr_reader :hostname, :pid
def initialize(attributes)
@hostname = attributes[:hostname]
@pid = attributes[:pid]
- @pid = @pid.to_s
+ @pid = Timber::Util::Object.try(@pid, :to_i)
end
# Builds a hash representation containing simple objects, suitable for serialization (JSON).
def as_json(_options = {})
- {hostname: hostname, pid: Timber::Util::Object.try(pid, :to_s)}
+ {hostname: hostname, pid: Timber::Util::Object.try(pid, :to_i)}
end
end
end
end
\ No newline at end of file