object2module 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile CHANGED
@@ -21,6 +21,10 @@ def apply_spec_defaults(s)
21
21
  s.date = Time.now.strftime '%Y-%m-%d'
22
22
  s.require_path = 'lib'
23
23
  s.homepage = "http://banisterfiend.wordpress.com"
24
+ s.files = FileList["Rakefile", "README.markdown", "LICENSE",
25
+ "lib/**/*.rb", "test/**/*.rb", "ext/**/extconf.rb",
26
+ "ext/**/*.h", "ext/**/*.c"].to_a
27
+
24
28
  end
25
29
 
26
30
  task :test do
@@ -32,9 +36,7 @@ end
32
36
  spec = Gem::Specification.new do |s|
33
37
  apply_spec_defaults(s)
34
38
  s.platform = "i386-#{v}"
35
- s.files = FileList["Rakefile", "README.markdown", "LICENSE",
36
- "lib/object2module.rb", "lib/1.8/object2module.#{dlext}",
37
- "lib/1.9/object2module.#{dlext}", "lib/object2module/version.rb", "test/*.rb"].to_a
39
+ s.files += FileList["lib/**/*.#{dlext}"].to_a
38
40
  end
39
41
 
40
42
  Rake::GemPackageTask.new(spec) do |pkg|
@@ -50,9 +52,6 @@ task :ruby do
50
52
  spec = Gem::Specification.new do |s|
51
53
  apply_spec_defaults(s)
52
54
  s.platform = Gem::Platform::RUBY
53
- s.files = FileList["Rakefile", "README.markdown", "LICENSE",
54
- "lib/object2module.rb","lib/object2module/version.rb",
55
- "test/*.rb", "ext/**/extconf.rb", "ext/**/*.h", "ext/**/*.c"].to_a
56
55
  s.extensions = ["ext/object2module/extconf.rb"]
57
56
  end
58
57
 
@@ -1,3 +1,3 @@
1
1
  module Object2module
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
3
3
  end
data/test/test.rb CHANGED
@@ -3,11 +3,12 @@ require 'rubygems'
3
3
  require 'bacon'
4
4
  require "#{direc}/../lib/object2module"
5
5
 
6
-
7
6
  class Module
8
7
  public :include, :remove_const
9
8
  end
10
9
 
10
+ puts "testing Object2module version #{Object2module::VERSION}..."
11
+
11
12
  describe Object2module do
12
13
  before do
13
14
  class A
@@ -9,6 +9,8 @@ class Module
9
9
  public :include, :remove_const
10
10
  end
11
11
 
12
+ puts "testing Object2module version #{Object2module::VERSION} with Remix version #{Remix::VERSION}..."
13
+
12
14
  describe Object2module do
13
15
  before do
14
16
  class A
@@ -122,6 +124,20 @@ describe Object2module do
122
124
  o.singleton_class.ancestors.first.should == Object
123
125
  end
124
126
 
127
+ it 'unextends an object by object (not by singleton)' do
128
+ o = Object.new
129
+ def o.hello
130
+ :o
131
+ end
132
+
133
+ n = Object.new
134
+ n.gen_extend o
135
+ n.hello.should == :o
136
+ n.unextend o
137
+ lambda { n.hello }.should.raise NameError
138
+ end
139
+
140
+
125
141
  it 'recursively unextends a singleton class gen_extended into another singleton class' do
126
142
  o = Object.new
127
143
  def o.hello
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: object2module
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
5
4
  prerelease: false
6
5
  segments:
7
6
  - 0
8
7
  - 4
9
- - 2
10
- version: 0.4.2
8
+ - 3
9
+ version: 0.4.3
11
10
  platform: ruby
12
11
  authors:
13
12
  - John Mair (banisterfiend)
@@ -15,7 +14,7 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2010-10-31 00:00:00 +13:00
17
+ date: 2010-11-01 00:00:00 +13:00
19
18
  default_executable:
20
19
  dependencies: []
21
20
 
@@ -31,8 +30,8 @@ files:
31
30
  - Rakefile
32
31
  - README.markdown
33
32
  - LICENSE
34
- - lib/object2module.rb
35
33
  - lib/object2module/version.rb
34
+ - lib/object2module.rb
36
35
  - test/test.rb
37
36
  - test/test_stress.rb
38
37
  - test/test_with_remix.rb
@@ -54,7 +53,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
54
53
  requirements:
55
54
  - - ">="
56
55
  - !ruby/object:Gem::Version
57
- hash: 3
58
56
  segments:
59
57
  - 0
60
58
  version: "0"
@@ -63,7 +61,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
63
61
  requirements:
64
62
  - - ">="
65
63
  - !ruby/object:Gem::Version
66
- hash: 3
67
64
  segments:
68
65
  - 0
69
66
  version: "0"