gen_eval 0.3.0-i386-mswin32 → 0.3.1-i386-mswin32
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/README.rdoc +2 -2
 - data/Rakefile +2 -40
 - data/lib/gen_eval/version.rb +3 -0
 - metadata +5 -6
 - data/lib/1.8/gen_eval.so +0 -0
 - data/lib/1.9/gen_eval.so +0 -0
 
    
        data/README.rdoc
    CHANGED
    
    | 
         @@ -1,4 +1,4 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            gen_eval is a homebrew version of instance_eval that eliminates the most annoying aspect of  
     | 
| 
      
 1 
     | 
    
         
            +
            gen_eval is a homebrew version of instance_eval that eliminates the most annoying aspect of its use:
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            For example:
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
         @@ -10,7 +10,7 @@ For example: 
     | 
|
| 
       10 
10 
     | 
    
         | 
| 
       11 
11 
     | 
    
         
             
                => error @x not initialized
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
       13 
     | 
    
         
            -
            In the above code  
     | 
| 
      
 13 
     | 
    
         
            +
            In the above code the programmer means to access the local @x yet instance_eval looks up @x in the receiver (my_image).
         
     | 
| 
       14 
14 
     | 
    
         | 
| 
       15 
15 
     | 
    
         
             
            gen_eval, on the other hand, works as you'd expect, it looks up @x in the caller-context yet still invokes methods in the receiver-context.
         
     | 
| 
       16 
16 
     | 
    
         | 
    
        data/Rakefile
    CHANGED
    
    | 
         @@ -2,7 +2,7 @@ require 'rake/clean' 
     | 
|
| 
       2 
2 
     | 
    
         
             
            #require 'rake/extensiontask'
         
     | 
| 
       3 
3 
     | 
    
         
             
            require 'rake/gempackagetask'
         
     | 
| 
       4 
4 
     | 
    
         
             
            require 'rake/rdoctask'
         
     | 
| 
       5 
     | 
    
         
            -
            require 'lib/gen_eval/version'
         
     | 
| 
      
 5 
     | 
    
         
            +
            require './lib/gen_eval/version'
         
     | 
| 
       6 
6 
     | 
    
         | 
| 
       7 
7 
     | 
    
         
             
            dlext = Config::CONFIG['DLEXT']
         
     | 
| 
       8 
8 
     | 
    
         
             
            direc = File.dirname(__FILE__)
         
     | 
| 
         @@ -24,7 +24,7 @@ spec = Gem::Specification.new do |s| 
     | 
|
| 
       24 
24 
     | 
    
         
             
            #    s.extensions = FileList["ext/**/extconf.rb"]
         
     | 
| 
       25 
25 
     | 
    
         
             
                s.has_rdoc = true
         
     | 
| 
       26 
26 
     | 
    
         
             
                s.add_dependency("object2module",">=0.3.0")
         
     | 
| 
       27 
     | 
    
         
            -
                s.files = ["Rakefile", "README.rdoc", "LICENSE", "lib/gen_eval.rb" 
     | 
| 
      
 27 
     | 
    
         
            +
                s.files = ["Rakefile", "README.rdoc", "LICENSE", "lib/gen_eval.rb"] + FileList["ext/**/extconf.rb", "ext/**/*.h", "ext/**/*.c", "lib/gen_eval/version.rb"].to_a
         
     | 
| 
       28 
28 
     | 
    
         
             
            end
         
     | 
| 
       29 
29 
     | 
    
         | 
| 
       30 
30 
     | 
    
         
             
            Rake::GemPackageTask.new(spec) do |pkg|
         
     | 
| 
         @@ -32,44 +32,6 @@ Rake::GemPackageTask.new(spec) do |pkg| 
     | 
|
| 
       32 
32 
     | 
    
         
             
                pkg.need_tar = false
         
     | 
| 
       33 
33 
     | 
    
         
             
            end
         
     | 
| 
       34 
34 
     | 
    
         | 
| 
       35 
     | 
    
         
            -
            ext_direc = "#{direc}/ext/gen_eval"
         
     | 
| 
       36 
     | 
    
         
            -
             
     | 
| 
       37 
     | 
    
         
            -
            file "#{ext_direc}/Makefile" => "#{ext_direc}/extconf.rb" do
         
     | 
| 
       38 
     | 
    
         
            -
              chdir(ext_direc) do
         
     | 
| 
       39 
     | 
    
         
            -
                sh 'ruby extconf.rb'
         
     | 
| 
       40 
     | 
    
         
            -
              end
         
     | 
| 
       41 
     | 
    
         
            -
            end
         
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
       43 
     | 
    
         
            -
            directory "#{direc}/lib/1.9"
         
     | 
| 
       44 
     | 
    
         
            -
            directory "#{direc}/lib/1.8"
         
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       46 
     | 
    
         
            -
            file "#{ext_direc}/gen_eval.#{dlext}" => ["#{ext_direc}/Makefile", "#{direc}/lib/1.9", "#{direc}/lib/1.8"] do
         
     | 
| 
       47 
     | 
    
         
            -
              chdir(ext_direc) do
         
     | 
| 
       48 
     | 
    
         
            -
                sh 'make'
         
     | 
| 
       49 
     | 
    
         
            -
             
     | 
| 
       50 
     | 
    
         
            -
                if RUBY_VERSION =~ /1.9/
         
     | 
| 
       51 
     | 
    
         
            -
                  cp "gen_eval.#{dlext}", "#[direc}/lib/1.9/"
         
     | 
| 
       52 
     | 
    
         
            -
                  puts "built gen_eval.#{dlext} and copied to #{direc}/lib/1.9"
         
     | 
| 
       53 
     | 
    
         
            -
                elsif RUBY_VERSION =~ /1.8/
         
     | 
| 
       54 
     | 
    
         
            -
                  cp "gen_eval.#{dlext}", "#[direc}/lib/1.8/"
         
     | 
| 
       55 
     | 
    
         
            -
                  puts "built gen_eval.#{dlext} and copied to #{direc}/lib/1.8"
         
     | 
| 
       56 
     | 
    
         
            -
                else
         
     | 
| 
       57 
     | 
    
         
            -
                  raise "Error, Rakefile only supports Ruby 1.8 and 1.9"
         
     | 
| 
       58 
     | 
    
         
            -
                end
         
     | 
| 
       59 
     | 
    
         
            -
              end
         
     | 
| 
       60 
     | 
    
         
            -
            end
         
     | 
| 
       61 
     | 
    
         
            -
             
     | 
| 
       62 
     | 
    
         
            -
            task :compile => "#{ext_direc}/gen_eval.#{dlext}"
         
     | 
| 
       63 
     | 
    
         
            -
             
     | 
| 
       64 
     | 
    
         
            -
                
         
     | 
| 
       65 
     | 
    
         
            -
              
         
     | 
| 
       66 
     | 
    
         
            -
             
     | 
| 
       67 
     | 
    
         
            -
            # Rake::ExtensionTask.new('mult', spec)  do |ext|
         
     | 
| 
       68 
     | 
    
         
            -
            #     ext.config_script = 'extconf.rb' 
         
     | 
| 
       69 
     | 
    
         
            -
            #     ext.cross_compile = true                
         
     | 
| 
       70 
     | 
    
         
            -
            #     ext.cross_platform = 'i386-mswin32'
         
     | 
| 
       71 
     | 
    
         
            -
            # end
         
     | 
| 
       72 
     | 
    
         
            -
             
     | 
| 
       73 
35 
     | 
    
         
             
            Rake::RDocTask.new do |rd|
         
     | 
| 
       74 
36 
     | 
    
         
             
              rd.main = "README.rdoc"
         
     | 
| 
       75 
37 
     | 
    
         
             
              rd.rdoc_files.include("README.rdoc", "lib/gen_eval.rb")
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,13 +1,13 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification 
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: gen_eval
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version 
         
     | 
| 
       4 
     | 
    
         
            -
              hash:  
     | 
| 
      
 4 
     | 
    
         
            +
              hash: 17
         
     | 
| 
       5 
5 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       6 
6 
     | 
    
         
             
              segments: 
         
     | 
| 
       7 
7 
     | 
    
         
             
              - 0
         
     | 
| 
       8 
8 
     | 
    
         
             
              - 3
         
     | 
| 
       9 
     | 
    
         
            -
              -  
     | 
| 
       10 
     | 
    
         
            -
              version: 0.3. 
     | 
| 
      
 9 
     | 
    
         
            +
              - 1
         
     | 
| 
      
 10 
     | 
    
         
            +
              version: 0.3.1
         
     | 
| 
       11 
11 
     | 
    
         
             
            platform: i386-mswin32
         
     | 
| 
       12 
12 
     | 
    
         
             
            authors: 
         
     | 
| 
       13 
13 
     | 
    
         
             
            - John Mair (banisterfiend)
         
     | 
| 
         @@ -15,7 +15,7 @@ autorequire: 
     | 
|
| 
       15 
15 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       16 
16 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       17 
17 
     | 
    
         | 
| 
       18 
     | 
    
         
            -
            date: 2010- 
     | 
| 
      
 18 
     | 
    
         
            +
            date: 2010-10-09 00:00:00 +13:00
         
     | 
| 
       19 
19 
     | 
    
         
             
            default_executable: 
         
     | 
| 
       20 
20 
     | 
    
         
             
            dependencies: 
         
     | 
| 
       21 
21 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
         @@ -47,12 +47,11 @@ files: 
     | 
|
| 
       47 
47 
     | 
    
         
             
            - README.rdoc
         
     | 
| 
       48 
48 
     | 
    
         
             
            - LICENSE
         
     | 
| 
       49 
49 
     | 
    
         
             
            - lib/gen_eval.rb
         
     | 
| 
       50 
     | 
    
         
            -
            - lib/1.8/gen_eval.so
         
     | 
| 
       51 
     | 
    
         
            -
            - lib/1.9/gen_eval.so
         
     | 
| 
       52 
50 
     | 
    
         
             
            - ext/gen_eval/extconf.rb
         
     | 
| 
       53 
51 
     | 
    
         
             
            - ext/gen_eval/compat.h
         
     | 
| 
       54 
52 
     | 
    
         
             
            - ext/gen_eval/gen_eval.h
         
     | 
| 
       55 
53 
     | 
    
         
             
            - ext/gen_eval/gen_eval.c
         
     | 
| 
      
 54 
     | 
    
         
            +
            - lib/gen_eval/version.rb
         
     | 
| 
       56 
55 
     | 
    
         
             
            has_rdoc: true
         
     | 
| 
       57 
56 
     | 
    
         
             
            homepage: http://banisterfiend.wordpress.com
         
     | 
| 
       58 
57 
     | 
    
         
             
            licenses: []
         
     | 
    
        data/lib/1.8/gen_eval.so
    DELETED
    
    | 
         Binary file 
     | 
    
        data/lib/1.9/gen_eval.so
    DELETED
    
    | 
         Binary file 
     |