luck 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
data/lib/luck/display.rb CHANGED
@@ -21,7 +21,7 @@ class Display
21
21
  end
22
22
 
23
23
  def pane name, *args, &blck
24
- if args.any? && args.first.is_a? Pane
24
+ if args.any? && args.first.is_a?(Pane)
25
25
  @panes[name] = args.first
26
26
  else
27
27
  @panes[name] = Pane.new(self, *args, &blck)
data/lib/luck/textbox.rb CHANGED
@@ -68,8 +68,10 @@ class TextBox < Label
68
68
  elsif char == :end
69
69
  @index = @text.size
70
70
  elsif char.is_a? String
71
- @text.insert @index, char
72
- @index += 1
71
+ if text.size < width
72
+ @text.insert @index, char
73
+ @index += 1
74
+ end
73
75
  end
74
76
  redraw
75
77
  end
data/luck.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{luck}
8
- s.version = "0.1.3"
8
+ s.version = "0.1.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Daniel Danopia"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: luck
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Danopia