luck 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/luck/display.rb +12 -2
  3. data/luck.gemspec +1 -1
  4. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
data/lib/luck/display.rb CHANGED
@@ -91,7 +91,12 @@ class Display
91
91
  end
92
92
 
93
93
  def cycle_controls
94
- index = @active_pane.controls.keys.index @active_pane.controls.index(@active_control)
94
+ if RUBY_VERSION.to_f > 1.8
95
+ index = @active_pane.controls.keys.index @active_pane.controls.key(@active_control)
96
+ else
97
+ index = @active_pane.controls.keys.index @active_pane.controls.index(@active_control)
98
+ end
99
+
95
100
  begin
96
101
  index += 1
97
102
  index = 0 if index >= @active_pane.controls.size
@@ -103,7 +108,12 @@ class Display
103
108
  end
104
109
 
105
110
  def cycle_controls_back
106
- index = @active_pane.controls.keys.index @active_pane.controls.index(@active_control)
111
+ if RUBY_VERSION.to_f > 1.8
112
+ index = @active_pane.controls.keys.index @active_pane.controls.key(@active_control)
113
+ else
114
+ index = @active_pane.controls.keys.index @active_pane.controls.index(@active_control)
115
+ end
116
+
107
117
  begin
108
118
  index -= 1
109
119
  index = @active_pane.controls.size - 1 if index < 0
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.4"
8
+ s.version = "0.1.5"
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.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Danopia