Skip to content

Commit 59e6c4b

Browse files
authored
Freeze all Ruby string literals (#190)
Merge pull request 190
1 parent 0d5564a commit 59e6c4b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+101
-3
lines changed

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
# frozen_string_literal: true
2+
13
source 'https://rubygems.org'
24
gemspec name: 'classifier-reborn'

Rakefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require 'rubygems'
24
require 'rake'
35
require 'rake/testtask'

classifier-reborn-jruby.gemspec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
lib = File.expand_path('lib', __dir__)
24
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
35
require 'classifier-reborn/version'
@@ -7,7 +9,7 @@ Gem::Specification.new do |s|
79
s.specification_version = 2 if s.respond_to? :specification_version=
810
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
911
s.rubygems_version = '2.2.2'
10-
s.required_ruby_version = '>= 2.2'
12+
s.required_ruby_version = '>= 2.4.0'
1113

1214
s.name = 'classifier-reborn-jruby'
1315
s.version = ClassifierReborn::VERSION

classifier-reborn.gemspec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
lib = File.expand_path('lib', __dir__)
24
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
35
require 'classifier-reborn/version'
@@ -6,7 +8,7 @@ Gem::Specification.new do |s|
68
s.specification_version = 2 if s.respond_to? :specification_version=
79
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
810
s.rubygems_version = '2.2.2'
9-
s.required_ruby_version = '>= 2.2'
11+
s.required_ruby_version = '>= 2.4.0'
1012

1113
s.name = 'classifier-reborn'
1214
s.version = ClassifierReborn::VERSION

lib/classifier-reborn.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
#--
24
# Copyright (c) 2005 Lucas Carlson
35
#

lib/classifier-reborn/backends/bayes_memory_backend.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module ClassifierReborn
24
class BayesMemoryBackend
35
attr_reader :total_words, :total_trainings

lib/classifier-reborn/backends/bayes_redis_backend.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require_relative 'no_redis_error'
24
# require redis when we run #intialize. This way only people using this backend
35
# will need to install and load the backend without having to

lib/classifier-reborn/backends/no_redis_error.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class NoRedisError < RuntimeError
24
def initialize
35
msg =

lib/classifier-reborn/bayes.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
# Author:: Lucas Carlson (mailto:lucas@rufy.com)
24
# Copyright:: Copyright (c) 2005 Lucas Carlson
35
# License:: LGPL

lib/classifier-reborn/category_namer.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
# Author:: Lucas Carlson (mailto:lucas@rufy.com)
24
# Copyright:: Copyright (c) 2005 Lucas Carlson
35
# License:: LGPL

0 commit comments

Comments
 (0)