rubygame 2.5.1 → 2.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/NEWS +12 -0
  2. data/Rakefile +1 -1
  3. data/lib/rubygame/event_handler.rb +5 -15
  4. metadata +2 -2
data/NEWS CHANGED
@@ -1,5 +1,17 @@
1
1
  = NEWS
2
2
 
3
+ == Rubygame 2.5.2
4
+
5
+ Release focus: Bug fixes.
6
+
7
+ === Fixes
8
+
9
+ - Fixed: HasEventHandler#handle (and other methods) dealt with
10
+ NoMethodError exceptions in a stupid way.
11
+
12
+
13
+
14
+
3
15
  == Rubygame 2.5.1
4
16
 
5
17
  Release focus: Bug fixes.
data/Rakefile CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
 
8
8
  # The version number for Rubygame.
9
- RUBYGAME_VERSION = [2,5,1]
9
+ RUBYGAME_VERSION = [2,5,2]
10
10
 
11
11
 
12
12
  #
@@ -208,28 +208,22 @@ module Rubygame::EventHandler::HasEventHandler
208
208
  # player.append_hook( hook )
209
209
  #
210
210
  def append_hook( hook )
211
+ _make_event_handler if @event_handler.nil?
211
212
  hook = _prepare_hook( hook )
212
213
  @event_handler.append_hook( hook )
213
- rescue NoMethodError
214
- _make_event_handler
215
- retry
216
214
  end
217
215
 
218
216
  # Passes the given event to the object's event handler.
219
217
  def handle( event )
218
+ _make_event_handler if @event_handler.nil?
220
219
  @event_handler.handle( event )
221
- rescue NoMethodError
222
- _make_event_handler
223
- retry
224
220
  end
225
221
 
226
222
  # Returns true if the object's event handler includes the given
227
223
  # EventHook instance.
228
224
  def has_hook?( hook )
225
+ _make_event_handler if @event_handler.nil?
229
226
  @event_handler.has_hook?( hook )
230
- rescue NoMethodError
231
- _make_event_handler
232
- retry
233
227
  end
234
228
 
235
229
 
@@ -316,11 +310,9 @@ module Rubygame::EventHandler::HasEventHandler
316
310
  # See also EventHandler#prepend_hook.
317
311
  #
318
312
  def prepend_hook( hook )
313
+ _make_event_handler if @event_handler.nil?
319
314
  hook = _prepare_hook( hook )
320
315
  @event_handler.prepend_hook( hook )
321
- rescue NoMethodError
322
- _make_event_handler
323
- retry
324
316
  end
325
317
 
326
318
  # Remove the given EventHook instance from the stack, if it
@@ -331,10 +323,8 @@ module Rubygame::EventHandler::HasEventHandler
331
323
  # exist on the stack.
332
324
  #
333
325
  def remove_hook( hook )
326
+ _make_event_handler if @event_handler.nil?
334
327
  @event_handler.remove_hook( hook )
335
- rescue NoMethodError
336
- _make_event_handler
337
- retry
338
328
  end
339
329
 
340
330
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubygame
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.1
4
+ version: 2.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Croisant
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-05-12 00:00:00 -05:00
12
+ date: 2009-05-16 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies: []
15
15