coderrr-mixico-inline 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/mixico.rb +10 -4
  2. data/mixico-inline.gemspec +1 -1
  3. metadata +2 -2
data/lib/mixico.rb CHANGED
@@ -4,7 +4,8 @@ require 'inline'
4
4
  class Module
5
5
  inline do |builder|
6
6
  builder.c %q{
7
- static VALUE disable_mixin(VALUE super)
7
+ static VALUE
8
+ disable_mixin(VALUE super)
8
9
  {
9
10
  VALUE p, kid;
10
11
  VALUE module = self;
@@ -25,7 +26,8 @@ class Module
25
26
  }
26
27
 
27
28
  builder.c %q{
28
- static VALUE enable_mixin(VALUE mixin)
29
+ static VALUE
30
+ enable_mixin(VALUE mixin)
29
31
  {
30
32
  VALUE p;
31
33
  VALUE module = self;
@@ -47,11 +49,15 @@ end
47
49
 
48
50
  class Proc
49
51
  def mixin mod
50
- eval('self', binding).extend mod
52
+ context.extend mod
51
53
  end
52
54
 
53
55
  def mixout mod
54
- (class << eval('self', binding); self end).disable_mixin mod
56
+ (class << context; self end).disable_mixin mod
57
+ end
58
+
59
+ def context
60
+ eval('self', self)
55
61
  end
56
62
  end
57
63
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "mixico-inline"
3
- s.version = "0.0.3"
3
+ s.version = "0.0.4"
4
4
  s.summary = "1.8.6 compatible version of why's mixico"
5
5
  s.email = "coderrr.contact@gmail.com"
6
6
  s.homepage = "http://github.com/coderrr/mixico-inline"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coderrr-mixico-inline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - why
@@ -11,7 +11,7 @@ autorequire: mixico
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2008-10-09 00:00:00 -07:00
14
+ date: 2008-10-25 00:00:00 -07:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency