oops-null 0.2.0 → 0.3.0

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.
Files changed (3) hide show
  1. data/Rakefile +8 -3
  2. data/ext/oops_null/oops_null.c +7 -1
  3. metadata +8 -5
data/Rakefile CHANGED
@@ -13,10 +13,15 @@ end
13
13
 
14
14
  spec = Gem::Specification.new do |s|
15
15
  s.name = 'oops-null'
16
- s.summary = 'A segfaulting native RubyGem for Windows'
17
- s.description = 'A native RubyGem for Windows that segfaults due to dereferencing a NULL pointer'
16
+ s.summary = 'A segfaulting native RubyGem for Windows and Linux'
17
+
18
+ s.description = <<-EOT
19
+ A native RubyGem for Windows and Linux that segfaults the Ruby interpreter
20
+ by dereferencing a NULL pointer
21
+ EOT
22
+
18
23
  s.homepage = 'http://oopsforge.github.com/'
19
- s.version = '0.2.0'
24
+ s.version = '0.3.0'
20
25
  s.date = Time.now.strftime('%Y-%m-%d')
21
26
 
22
27
  s.authors = ['Jon Maken']
@@ -6,13 +6,19 @@ VALUE cOopsNull = Qnil;
6
6
  static VALUE boom(VALUE self)
7
7
  {
8
8
  FILE* pFile;
9
+ int flags;
9
10
 
10
11
  pFile = fopen("MyBogusPurchaseOrder.edi", "rb");
11
12
 
12
13
  /* Trying to reference a member of a FILE structure through a NULL pointer
13
14
  * causes a segmentation fault.
14
15
  */
15
- printf("Backing FILE buffer size %d\n", pFile->_bufsiz);
16
+ #if defined(__MINGW32__)
17
+ flags = pFile->_flag;
18
+ #else
19
+ flags = pFile->_flags;
20
+ #endif
21
+ printf("Backing FILE struct flags: %d\n", flags);
16
22
 
17
23
  /* Because of the segfault this part will never be reached. It is left
18
24
  * as an example of how an opened file should be closed, thus avoiding
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 2
7
+ - 3
8
8
  - 0
9
- version: 0.2.0
9
+ version: 0.3.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jon Maken
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-01-28 00:00:00 -05:00
17
+ date: 2011-01-29 00:00:00 -05:00
18
18
  default_executable: nulloops
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -32,7 +32,10 @@ dependencies:
32
32
  version: 0.7.5
33
33
  type: :development
34
34
  version_requirements: *id001
35
- description: A native RubyGem for Windows that segfaults due to dereferencing a NULL pointer
35
+ description: |
36
+ A native RubyGem for Windows and Linux that segfaults the Ruby interpreter
37
+ by dereferencing a NULL pointer
38
+
36
39
  email: jon.forums@gmail.com
37
40
  executables:
38
41
  - nulloops
@@ -78,6 +81,6 @@ rubyforge_project:
78
81
  rubygems_version: 1.3.7
79
82
  signing_key:
80
83
  specification_version: 3
81
- summary: A segfaulting native RubyGem for Windows
84
+ summary: A segfaulting native RubyGem for Windows and Linux
82
85
  test_files: []
83
86