From cc2b6f24436439ddffda62d9c85d295da1316d18 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sat, 6 May 2017 20:45:12 +0200 Subject: =?UTF-8?q?Don=E2=80=99t=20use=20class=20variables.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/plist/parser.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/plist/parser.rb b/lib/plist/parser.rb index 705d823..4835f8b 100755 --- a/lib/plist/parser.rb +++ b/lib/plist/parser.rb @@ -130,10 +130,8 @@ module Plist end class PTag - @@mappings = {} - def self.mappings - @@mappings + @mappings ||= {} end def self.inherited(sub_class) @@ -141,7 +139,7 @@ module Plist key.gsub!(/^plist::/, '') key.gsub!(/^p/, '') unless key == "plist" - @@mappings[key] = sub_class + mappings[key] = sub_class end attr_accessor :text, :children -- cgit v1.2.1