sugarcube 1.4.4 → 1.4.5

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sugarcube (1.4.4)
4
+ sugarcube (1.4.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -82,7 +82,7 @@ module SugarCube
82
82
  class UIControlCallbackHelper
83
83
 
84
84
  def initialize(callback)
85
- @callback = callback.weak!
85
+ @callback = callback.respond_to?('weak!') ? callback.weak! : callback
86
86
  end
87
87
 
88
88
  def call(sender, event:event)
@@ -72,7 +72,7 @@ private
72
72
  self.sugarcube_callbacks(notification) << NSNotificationCenter.defaultCenter.addObserverForName(notification,
73
73
  object: self,
74
74
  queue: NSOperationQueue.mainQueue,
75
- usingBlock: block.weak!)
75
+ usingBlock: block.respond_to?('weak!') ? block.weak! : block)
76
76
  end
77
77
 
78
78
  def _offEventNotification(notification)
@@ -129,7 +129,7 @@ class UIBarButtonItem
129
129
  def set_target_and_action target, action
130
130
  self.target = target
131
131
  self.action = 'sugarcube_handle_action:'
132
- @sugarcube_action = action
132
+ @sugarcube_action = action.respond_to?('weak!') ? action.weak! : action
133
133
  end
134
134
 
135
135
 
@@ -226,7 +226,7 @@ private
226
226
  self.addGestureRecognizer(recognizer)
227
227
 
228
228
  @sugarcube_recognizers = {} unless @sugarcube_recognizers
229
- @sugarcube_recognizers[recognizer] = proc.weak!
229
+ @sugarcube_recognizers[recognizer] = proc.respond_to?('weak!') ? proc.weak! : proc
230
230
 
231
231
  recognizer
232
232
  end
@@ -28,11 +28,11 @@ class UINavigationController
28
28
  self
29
29
  end
30
30
 
31
- def pop(to_view=nil)
32
- if to_view == :root
31
+ def pop(to_vc=nil)
32
+ if to_vc == :root
33
33
  self.popToRootViewControllerAnimated(true)
34
- elsif to_view
35
- self.popToViewController(to_view, animated: true)
34
+ elsif to_vc
35
+ self.popToViewController(to_vc, animated: true)
36
36
  else
37
37
  self.popViewControllerAnimated(true)
38
38
  end
@@ -1,3 +1,3 @@
1
1
  module SugarCube
2
- Version = '1.4.4'
2
+ Version = '1.4.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sugarcube
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.4
4
+ version: 1.4.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2014-01-31 00:00:00.000000000 Z
15
+ date: 2014-02-07 00:00:00.000000000 Z
16
16
  dependencies: []
17
17
  description: ! '== Description
18
18