Skip to content

Commit

Permalink
Fix incorrect initial value in config.default setting
Browse files Browse the repository at this point in the history
  • Loading branch information
hidakatsuya committed Nov 25, 2023
1 parent 8514c4f commit 30f9067
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/prawn/disable_word_break.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ module DisableWordBreak
extend Forwardable

Config = Struct.new(
# Sets the default value for the disable_word_break option. Default is false.
# Sets the default value for the disable_word_break option. Default is true.
:default,

keyword_init: true
)

def self.config
@config ||= Config.new(default: false)
@config ||= Config.new(default: true)
end
end
end
Expand Down
2 changes: 2 additions & 0 deletions test/features/text_line_wrapping_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ class TextLineWrappingTest < Test::Unit::TestCase
include TestHelper

test 'text line-wrapping' do
Prawn::DisableWordBreak.config.default = false

pdf = Prawn::Document.new do |doc|
doc.instance_eval(&renderer_on("DisabledWordBreak is disabled", disable_word_break_option: false))

Expand Down

0 comments on commit 30f9067

Please sign in to comment.