Skip to content

Commit

Permalink
enable frozen literals
Browse files Browse the repository at this point in the history
  • Loading branch information
gfx committed Dec 28, 2016
1 parent 3aaabca commit e79bf31
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions lib/pygments.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# coding: utf-8
# frozen_string_literal: true
require File.join(File.dirname(__FILE__), 'pygments/popen')
require 'forwardable'

Expand Down
2 changes: 2 additions & 0 deletions lib/pygments/lexer.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# coding: utf-8
# frozen_string_literal: true
module Pygments
class Lexer < Struct.new(:name, :aliases, :filenames, :mimetypes)
@lexers = []
Expand Down
6 changes: 3 additions & 3 deletions lib/pygments/popen.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# coding: utf-8
# frozen_string_literal: true

require 'open3'
require 'multi_json'
require 'timeout'
Expand Down Expand Up @@ -371,9 +373,7 @@ def handle_header_and_return(header, id)
# id, with two padding also. This means we are sending over the 8 characters +
# code + 8 characters.
def add_ids(code, id)
code.freeze
code = id + " #{code} #{id}"
code
(id + " #{code} #{id}").freeze
end

# Write data to mentos, the Python process.
Expand Down
2 changes: 2 additions & 0 deletions lib/pygments/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# coding: utf-8
# frozen_string_literal: true
module Pygments
VERSION = '1.1.0'
end
3 changes: 2 additions & 1 deletion test/test_pygments.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#coding: utf-8
# coding: utf-8
# frozen_string_literal: true

require 'test/unit'
require File.join(File.dirname(__FILE__), '..', '/lib/pygments.rb')
Expand Down

0 comments on commit e79bf31

Please sign in to comment.