about summary refs log tree commit diff
path: root/app/lib/emoji.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/lib/emoji.rb')
-rw-r--r--app/lib/emoji.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/lib/emoji.rb b/app/lib/emoji.rb
index e444b6893..45b7f53de 100644
--- a/app/lib/emoji.rb
+++ b/app/lib/emoji.rb
@@ -6,7 +6,7 @@ class Emoji
   include Singleton
 
   def initialize
-    data = Oj.load(File.open(File.join(Rails.root, 'lib', 'assets', 'emoji.json')))
+    data = Oj.load(File.open(Rails.root.join('lib', 'assets', 'emoji.json')))
 
     @map = {}
 
@@ -32,7 +32,7 @@ class Emoji
 
   def codepoint_to_unicode(codepoint)
     if codepoint.include?('-')
-      codepoint.split('-').map(&:hex).pack('U')
+      codepoint.split('-').map(&:hex).pack('U*')
     else
       [codepoint.hex].pack('U')
     end