mzl 0.0.1 → 0.0.2

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.
@@ -79,12 +79,12 @@ module Mzl
79
79
  end
80
80
 
81
81
  # instance method not class method!
82
- def new(&block)
82
+ def new(*args, &block)
83
83
  # we will need ourselves later
84
84
  _self = self
85
85
 
86
86
  # create an instance of subject
87
- instance = subject.respond_to?(:mzl_orig_new) ? subject.mzl_orig_new : subject.new
87
+ instance = subject.respond_to?(:mzl_orig_new) ? subject.mzl_orig_new(*args) : subject.new(*args)
88
88
  instance = block_given? ? exec(instance, &block) : instance
89
89
 
90
90
  # Give the instance a mzl thing (_self)
@@ -1,3 +1,3 @@
1
1
  module Mzl
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -79,6 +79,10 @@ describe 'Class' do
79
79
  klass.mzl.new.should be_a(klass)
80
80
  end
81
81
 
82
+ it 'passes parameters to the original .new method' do
83
+ String.mzl.new("hello").should == "hello"
84
+ end
85
+
82
86
  it 'sets self to the instance' do
83
87
  catch(:instance) do
84
88
  klass.mzl.new do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mzl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -49,7 +49,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
49
49
  version: '0'
50
50
  segments:
51
51
  - 0
52
- hash: -1818933194322953242
52
+ hash: 3004095836719219579
53
53
  required_rubygems_version: !ruby/object:Gem::Requirement
54
54
  none: false
55
55
  requirements:
@@ -58,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
58
58
  version: '0'
59
59
  segments:
60
60
  - 0
61
- hash: -1818933194322953242
61
+ hash: 3004095836719219579
62
62
  requirements: []
63
63
  rubyforge_project:
64
64
  rubygems_version: 1.8.24