rmagick 5.2.0 → 5.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63297d93ba6355721cf93286469d8f1d278d553ca80b1c85fa5cefbc50f4217f
4
- data.tar.gz: 7d416384fa378aa68c2f16c980e41c63d932a805e488c7cb2bc987c974262736
3
+ metadata.gz: bbc981dbe87ea60366b54e23cbf158b40abe7c17db2f506cad561c851728bbcc
4
+ data.tar.gz: 3ed1649aad11bd5d092288ad20e5c4d50d9b3d44e129c0b168f94cfdf423693a
5
5
  SHA512:
6
- metadata.gz: 2f03de2614b1b8321b6a26a01e47cbf625455c4bfc5e88c9ae3354bf933d66a63fee9b9205c8a7d72893672e15bb8933bcb2cb8915074e702d74876c4c1c742f
7
- data.tar.gz: f9fa937f718148d007962a0b6e2f6588cc157d9a4998fccd942a5c8ac3066ca04bf8e60b79067abe5ee0c2402621cdb571287dca72ecdc6bc45625303ec71dfc
6
+ metadata.gz: f3bb53278c117cb808987e70bd8b09cb5ac89dd185e51684b745cf71880e876c0b0da304b24b30169c3eb53698503630d550ab3e449ce9b8a02bcbd26a3f5ca1
7
+ data.tar.gz: ff0beeeb2c91ad2e284d14f05617938bf5c7b96ef72d31fcbe9b3a5f96a217d084f60dee7fd52573be36a18689d77788951f410b2bcad6976032917e9828706b
@@ -4,7 +4,7 @@
4
4
  "dockerfile": "../Dockerfile",
5
5
  "args": {
6
6
  "RUBY_VERSION": "3.1.2",
7
- "IMAGEMAGICK_VERSION": "6.9.12-59"
7
+ "IMAGEMAGICK_VERSION": "6.9.13-4"
8
8
  }
9
9
  },
10
10
  "onCreateCommand": "/setup/setup-repo.sh"
@@ -4,7 +4,7 @@
4
4
  "dockerfile": "Dockerfile",
5
5
  "args": {
6
6
  "RUBY_VERSION": "3.1.2",
7
- "IMAGEMAGICK_VERSION": "7.1.0-55"
7
+ "IMAGEMAGICK_VERSION": "7.1.1-26"
8
8
  }
9
9
  },
10
10
  "onCreateCommand": "/setup/setup-repo.sh"
@@ -42,4 +42,4 @@ __show_notice
42
42
  EOF
43
43
  )"
44
44
 
45
- echo "${codespaces_bash}" >> "/root/.bashrc"
45
+ echo "${codespaces_bash}" >> "/root/.bashrc"
data/.editorconfig CHANGED
@@ -13,5 +13,5 @@ tab_width = 2
13
13
  [{*.{rb,yml,sh,md}]
14
14
  indent_size = 2
15
15
 
16
- [*.c]
16
+ [*.cpp]
17
17
  indent_size = 4
@@ -15,7 +15,7 @@ jobs:
15
15
  runs-on: ubuntu-latest
16
16
  timeout-minutes: 20
17
17
  steps:
18
- - uses: actions/checkout@v3
18
+ - uses: actions/checkout@v4
19
19
  - name: Set up Ruby 2.3
20
20
  uses: ruby/setup-ruby@master
21
21
  with:
@@ -30,17 +30,29 @@ jobs:
30
30
  timeout-minutes: 20
31
31
  strategy:
32
32
  matrix:
33
- ruby-version: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2']
33
+ ruby-version: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3']
34
34
  imagemagick-version:
35
35
  - { full: 6.7.7-10, major-minor: '6.7' }
36
36
  - { full: 6.8.9-10, major-minor: '6.8' }
37
- - { full: 6.9.12-70, major-minor: '6.9' }
37
+ - { full: 6.9.13-4, major-minor: '6.9' }
38
38
  - { full: 7.0.11-14, major-minor: '7.0' }
39
- - { full: 7.1.0-55, major-minor: '7.1' }
39
+ - { full: 7.1.1-26, major-minor: '7.1' }
40
+ exclude:
41
+ # Ghostscript 9.55.0 causes error with Ruby 3.3 + ImageMagick 6.7 when run Magick::Draw tests.
42
+ # It disable running tests with Ruby 3.3 + ImageMagick 6.7 because it might be difficult to support old ImageMagick.
43
+ - ruby-version: '3.3'
44
+ imagemagick-version: { major-minor: '6.7' }
40
45
 
41
46
  name: Linux, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
42
47
  steps:
43
- - uses: actions/checkout@v3
48
+ - uses: actions/checkout@v4
49
+ - name: Cache ImageMagick built objects
50
+ uses: actions/cache@v4
51
+ with:
52
+ path: ./build-ImageMagick
53
+ key: v1-${{ runner.os }}-imagemagick-${{ matrix.imagemagick-version.full }}
54
+ restore-keys: |
55
+ v1-${{ runner.os }}-imagemagick-${{ matrix.imagemagick-version.full }}
44
56
  - name: Set up Ruby ${{ matrix.ruby-version }}
45
57
  uses: ruby/setup-ruby@master
46
58
  with:
@@ -59,15 +71,21 @@ jobs:
59
71
  timeout-minutes: 20
60
72
  strategy:
61
73
  matrix:
62
- ruby-version: ['2.6', '2.7', '3.0', '3.1', '3.2']
74
+ ruby-version: ['2.6', '2.7', '3.0', '3.1', '3.2', '3.3']
63
75
  imagemagick-version:
64
- - { full: 6.9.12-70, major-minor: '6.9' }
65
- - { full: 7.0.11-14, major-minor: '7.0' }
66
- - { full: 7.1.0-55, major-minor: '7.1' }
76
+ - { full: 6.9.13-4, major-minor: '6.9' }
77
+ - { full: 7.1.1-26, major-minor: '7.1' }
67
78
 
68
79
  name: macOS, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
69
80
  steps:
70
- - uses: actions/checkout@v3
81
+ - uses: actions/checkout@v4
82
+ - name: Cache ImageMagick built objects
83
+ uses: actions/cache@v4
84
+ with:
85
+ path: ./build-ImageMagick
86
+ key: v1-${{ runner.os }}-imagemagick-${{ matrix.imagemagick-version.full }}
87
+ restore-keys: |
88
+ v1-${{ runner.os }}-imagemagick-${{ matrix.imagemagick-version.full }}
71
89
  - name: Set up Ruby ${{ matrix.ruby-version }}
72
90
  uses: ruby/setup-ruby@master
73
91
  with:
@@ -79,3 +97,46 @@ jobs:
79
97
  run: |
80
98
  bundle install --path=vendor/bundle --jobs 4 --retry 3
81
99
  bundle exec rake
100
+
101
+ test-windows:
102
+ runs-on: windows-latest
103
+ timeout-minutes: 20
104
+ strategy:
105
+ matrix:
106
+ ruby-version: ['3.3']
107
+ imagemagick-version:
108
+ - { full: 6.9.13-4, major-minor: '6.9' }
109
+ - { full: 7.1.1-26, major-minor: '7.1' }
110
+ env:
111
+ bundled_im_dir: C:\Program Files\ImageMagick-7.1.1-Q16-HDRI
112
+ install_im_dir: D:\ImageMagick
113
+
114
+ name: MSWin, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
115
+ steps:
116
+ - uses: actions/checkout@v4
117
+ - name: Setup environment variable
118
+ # https://stackoverflow.com/questions/60169752/how-to-update-the-path-in-a-github-action-workflow-file-for-a-windows-latest-hos
119
+ run: |
120
+ Add-Content $env:GITHUB_PATH ${{ env.install_im_dir }}
121
+ - name: Uninstall bundled ImageMagick
122
+ # Bundled ImageMagick does not have C/C++ library and dll which required by rmagick.
123
+ run: |
124
+ Start-Process -FilePath "${{ env.bundled_im_dir }}\unins000.exe" -ArgumentList "/VERYSILENT /NORESTART"
125
+ - name: Set up Ruby ${{ matrix.ruby-version }}
126
+ uses: ruby/setup-ruby@master
127
+ with:
128
+ ruby-version: ${{ matrix.ruby-version }}
129
+ - name: Install ghostscript
130
+ run: |
131
+ choco install ghostscript
132
+ - name: Install ImageMagick
133
+ # https://github.com/rmagick/ImageMagick-binaries
134
+ run: |
135
+ $imagemagick_version = "${{ matrix.imagemagick-version.full }}"
136
+ $installer_name = "ImageMagick-$($imagemagick_version)-Q16-x64-dll.exe"
137
+ $url = "https://github.com/rmagick/ImageMagick-binaries/raw/main/$($installer_name)"
138
+ Invoke-WebRequest -Uri $url -OutFile $installer_name
139
+ Start-Process -FilePath $installer_name -ArgumentList "/DIR=${{ env.install_im_dir }} /VERYSILENT /NORESTART /TASKS=install_Devel"
140
+ - name: Build and test with Rake
141
+ run: |
142
+ cmd.exe /D /S /C "bundle install --path=vendor/bundle --retry 3 & bundle exec rake"
data/.gitignore CHANGED
@@ -20,6 +20,9 @@ tmp
20
20
  *.o
21
21
  *.a
22
22
  *.log
23
+ *.def
23
24
  Makefile
24
25
  extconf.h
25
26
  build-ImageMagick/
27
+ doc/node_modules/
28
+ doc/package-lock.json
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
2
  lib/**/*.rb
3
- ext/**/*.c
3
+ ext/**/*.cpp
4
4
  *.md
5
5
  LICENSE
data/CHANGELOG.md CHANGED
@@ -3,6 +3,31 @@
3
3
  All notable changes to this project are documented in this file.
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## RMagick 5.4.0
7
+
8
+ Improvements
9
+
10
+ - Use rb_io_path() if exist because pathv attr was marked as deprecated at Ruby 3.3 (#1409)
11
+ - Add observer gem as dependency (#1411)
12
+ - Add aliases of filter type (#1439)
13
+ - Release GVL in Image#contrast (#1440)
14
+
15
+ Bug Fixes
16
+
17
+ - Use C++ compiler in order to fix installation error with latest ImageMagick 7 on Windows (#1433)
18
+
19
+ ## RMagick 5.3.0
20
+
21
+ Improvements
22
+
23
+ - Support GC compaction (#1388)
24
+
25
+ Bug Fixes
26
+
27
+ - Fix memory leak in `Magick::Draw` for recentry ImageMagick 6 by removing unnecessary `GetDrawInfo()` calling (#1406)
28
+ - Fix crash on ImageList#write with animation gif (#1379)
29
+ - Windows: Fix RubyInstaller::Runtime::DllDirectory::WinApiError (#1381)
30
+
6
31
  ## RMagick 5.2.0
7
32
 
8
33
  Improvements
data/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  RMagick
2
2
  =======
3
3
 
4
- [![Codacy Badge](https://api.codacy.com/project/badge/Grade/901780ea1a244a8584b18033b2e03866)](https://app.codacy.com/gh/rmagick/rmagick?utm_source=github.com&utm_medium=referral&utm_content=rmagick/rmagick&utm_campaign=Badge_Grade_Settings)
5
4
  [![GemVersion](https://img.shields.io/gem/v/rmagick.svg?style=flat)](https://rubygems.org/gems/rmagick)
6
5
  ![CI](https://github.com/rmagick/rmagick/workflows/CI/badge.svg)
7
6
 
@@ -105,7 +104,7 @@ brew install imagemagick@6
105
104
  2. You might need to configure `PATH` environment variable to where the compiler is located.
106
105
  (Ex: `set PATH=C:\Ruby27-x64\msys64\usr\bin;C:\Ruby27-x64\msys64\mingw64\bin;%PATH%`)
107
106
  3. Download `ImageMagick-7.XXXX-Q16-x64-dll.exe` (not, `ImageMagick-7.XXXX-Q16-x64-static.exe`) binary from [Windows Binary Release](https://imagemagick.org/script/download.php#windows), or you can download ImageMagick 6 from [Windows Binary Release](https://legacy.imagemagick.org/script/download.php#windows).
108
- 4. Install ImageMagick. You need to turn on checkboxes `Add application directory to your system path` and `Install development headers and librarries for C and C++` in an installer for RMagick.
107
+ 4. Install ImageMagick. You need to turn on checkboxes `Add application directory to your system path` and `Install development headers and libraries for C and C++` in an installer for RMagick.
109
108
  <img width="50%" src="https://user-images.githubusercontent.com/199156/77183472-b72cbd00-6b11-11ea-8b9a-247bc1f9d8b1.png" />
110
109
 
111
110
  Installing RMagick
@@ -24,7 +24,7 @@ sudo apt-get autoremove -y imagemagick* libmagick* --purge
24
24
  # install build tools, ImageMagick delegates
25
25
  sudo apt-get install -y build-essential libx11-dev libxext-dev zlib1g-dev \
26
26
  liblcms2-dev libpng-dev libjpeg-dev libfreetype6-dev libxml2-dev \
27
- libtiff5-dev libwebp-dev liblqr-1-0-dev vim gsfonts ghostscript ccache
27
+ libtiff5-dev libwebp-dev liblqr-1-0-dev vim gsfonts ghostscript
28
28
 
29
29
  if [ ! -d /usr/include/freetype ]; then
30
30
  # If `/usr/include/freetype` is not existed, ImageMagick 6.7 configuration fails about Freetype.
@@ -52,7 +52,7 @@ build_imagemagick() {
52
52
  fi
53
53
 
54
54
  cd "${build_dir}"
55
- CC="ccache cc" CXX="ccache c++" ./configure --prefix=/usr "${options}"
55
+ ./configure --prefix=/usr "${options}"
56
56
  make -j
57
57
  }
58
58
 
@@ -17,10 +17,10 @@ fi
17
17
 
18
18
  export HOMEBREW_NO_AUTO_UPDATE=true
19
19
  brew uninstall --force imagemagick imagemagick@6
20
- brew install wget ghostscript freetype jpeg little-cms2 libomp libpng libtiff liblqr libtool zlib webp
20
+ brew install wget ghostscript freetype jpeg little-cms2 openexr libomp libpng libtiff liblqr libtool zlib webp
21
21
 
22
- export LDFLAGS="-L/usr/local/opt/libxml2/lib -L/usr/local/opt/zlib/lib"
23
- export CPPFLAGS="-I/usr/local/opt/libxml2/include -I/usr/local/opt/zlib/include"
22
+ export LDFLAGS="-L$(brew --prefix libxml2)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix glib)/lib -L$(brew --prefix openexr)/lib"
23
+ export CPPFLAGS="-I$(brew --prefix libxml2)/include -I$(brew --prefix zlib)/include -I$(brew --prefix glib)/include/glib-2.0 -I$(brew --prefix glib)/lib/glib-2.0/include -I$(brew --prefix openexr)/include/OpenEXR"
24
24
 
25
25
  project_dir=$(pwd)
26
26
  build_dir="${project_dir}/build-ImageMagick/ImageMagick-${IMAGEMAGICK_VERSION}"
@@ -43,7 +43,7 @@ build_imagemagick() {
43
43
  fi
44
44
 
45
45
  cd "${build_dir}"
46
- ./configure --prefix=/usr/local "${options}" --without-raw
46
+ ./configure --prefix=/usr/local "${options}" --without-raw --without-jxl
47
47
  make -j
48
48
  }
49
49
 
@@ -4,6 +4,12 @@ require 'rubygems'
4
4
  require 'mkmf'
5
5
  require 'pkg-config'
6
6
 
7
+ module MakeMakefile
8
+ # Use the C++ compiler to retrieve the information needed to create a Makefile.
9
+ remove_const(:CONFTEST_C)
10
+ CONFTEST_C = "#{CONFTEST}.cpp"
11
+ end
12
+
7
13
  module RMagick
8
14
  class Extconf
9
15
  require 'rmagick/version'
@@ -77,7 +83,7 @@ module RMagick
77
83
  end
78
84
 
79
85
  def configure_headers
80
- @headers = %w[assert.h ctype.h stdio.h stdlib.h math.h time.h sys/types.h]
86
+ @headers = %w[assert.h ctype.h stdio.h stdlib.h math.h time.h sys/types.h ruby.h ruby/io.h]
81
87
 
82
88
  if have_header('MagickCore/MagickCore.h')
83
89
  headers << 'MagickCore/MagickCore.h'
@@ -111,6 +117,8 @@ module RMagick
111
117
  $LDFLAGS = "#{original_ldflags} #{ldflags}"
112
118
  end
113
119
 
120
+ $CPPFLAGS += ' -std=c++11 -Wno-register'
121
+
114
122
  configure_archflags_for_osx($magick_package) if RUBY_PLATFORM =~ /darwin/ # osx
115
123
 
116
124
  elsif RUBY_PLATFORM =~ /mingw/ # mingw
@@ -120,6 +128,8 @@ module RMagick
120
128
  $LDFLAGS += %( -L"#{dir_paths[:lib]}")
121
129
  $LDFLAGS << ' -lucrt' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.4.0')
122
130
 
131
+ $CPPFLAGS += ' -std=c++11 -Wno-register'
132
+
123
133
  have_library(im_version_at_least?('7.0.0') ? 'CORE_RL_MagickCore_' : 'CORE_RL_magick_')
124
134
 
125
135
  else # mswin
@@ -131,13 +141,11 @@ module RMagick
131
141
 
132
142
  $LOCAL_LIBS += ' ' + (im_version_at_least?('7.0.0') ? 'CORE_RL_MagickCore_.lib' : 'CORE_RL_magick_.lib')
133
143
 
144
+ $CPPFLAGS += ' /std:c++11'
134
145
  end
135
-
136
- $CPPFLAGS << if have_macro('__GNUC__')
137
- ' -std=gnu99 -Wno-void-pointer-to-int-cast -Wno-void-pointer-to-enum-cast -Wno-pointer-to-int-cast'
138
- else
139
- ' -std=c99'
140
- end
146
+ ruby_version = RUBY_VERSION.split('.')
147
+ $CPPFLAGS += " -DRUBY_VERSION_MAJOR=#{ruby_version[0]} -DRUBY_VERSION_MINOR=#{ruby_version[1]}"
148
+ $CPPFLAGS += ' $(optflags) $(debugflags)'
141
149
  end
142
150
 
143
151
  def exit_failure(msg)
@@ -305,10 +313,8 @@ module RMagick
305
313
  exit_failure <<~END_MINGW
306
314
  Can't install RMagick #{RMAGICK_VERS}.
307
315
  Can't find the ImageMagick library.
308
- Retry with '--with-opt-dir' option.
309
- Usage: gem install rmagick -- '--with-opt-dir=\"[path to ImageMagick]\"'
310
- e.g.
311
- gem install rmagick -- '--with-opt-dir=\"C:\\Program Files\\ImageMagick-6.9.1-Q16\"'
316
+
317
+ Please check PATH environment variable for ImageMagick installation path.
312
318
  END_MINGW
313
319
  end
314
320
 
@@ -360,7 +366,9 @@ module RMagick
360
366
 
361
367
  def create_header_file
362
368
  ruby_api = [
363
- 'rb_gc_adjust_memory_usage' # Ruby 2.4.0
369
+ 'rb_gc_adjust_memory_usage', # Ruby 2.4.0
370
+ 'rb_gc_mark_movable', # Ruby 2.7.0
371
+ 'rb_io_path' # Ruby 3.2.0
364
372
  ]
365
373
  memory_api = %w[
366
374
  posix_memalign
@@ -5,8 +5,8 @@
5
5
  *
6
6
  * Changes since Nov. 2009 copyright &copy; by Benjamin Thomas and Omer Bar-or
7
7
  *
8
- * @file rmagick.c
9
- * @version $Id: rmagick.c,v 1.4 2009/12/20 02:33:32 baror Exp $
8
+ * @file rmagick.cpp
9
+ * @version $Id: rmagick.cpp,v 1.4 2009/12/20 02:33:32 baror Exp $
10
10
  * @author Tim Hunter
11
11
  ******************************************************************************/
12
12
 
@@ -14,8 +14,6 @@
14
14
 
15
15
 
16
16
 
17
- static VALUE rm_yield_handle_exception(VALUE, VALUE) ATTRIBUTE_NORETURN;
18
-
19
17
  static VALUE
20
18
  rm_yield_body(VALUE object)
21
19
  {
@@ -42,7 +40,7 @@ rm_yield_handle_exception(VALUE allocated_area, VALUE exc)
42
40
  *
43
41
  */
44
42
  VALUE
45
- Magick_colors(VALUE class)
43
+ Magick_colors(VALUE klass)
46
44
  {
47
45
  const ColorInfo **color_info_list;
48
46
  size_t number_colors, x;
@@ -60,10 +58,10 @@ Magick_colors(VALUE class)
60
58
  {
61
59
  for (x = 0; x < number_colors; x++)
62
60
  {
63
- rb_rescue(rm_yield_body, Import_ColorInfo(color_info_list[x]), rm_yield_handle_exception, (VALUE)color_info_list);
61
+ rb_rescue(RESCUE_FUNC(rm_yield_body), Import_ColorInfo(color_info_list[x]), RESCUE_EXCEPTION_HANDLER_FUNC(rm_yield_handle_exception), (VALUE)color_info_list);
64
62
  }
65
63
  magick_free((void *)color_info_list);
66
- return class;
64
+ return klass;
67
65
  }
68
66
  else
69
67
  {
@@ -93,7 +91,7 @@ Magick_colors(VALUE class)
93
91
  *
94
92
  */
95
93
  VALUE
96
- Magick_fonts(VALUE class)
94
+ Magick_fonts(VALUE klass)
97
95
  {
98
96
  const TypeInfo **type_info;
99
97
  size_t number_types, x;
@@ -109,10 +107,10 @@ Magick_fonts(VALUE class)
109
107
  {
110
108
  for (x = 0; x < number_types; x++)
111
109
  {
112
- rb_rescue(rm_yield_body, Import_TypeInfo((const TypeInfo *)type_info[x]), rm_yield_handle_exception, (VALUE)type_info);
110
+ rb_rescue(RESCUE_FUNC(rm_yield_body), Import_TypeInfo((const TypeInfo *)type_info[x]), RESCUE_EXCEPTION_HANDLER_FUNC(rm_yield_handle_exception), (VALUE)type_info);
113
111
  }
114
112
  magick_free((void *)type_info);
115
- return class;
113
+ return klass;
116
114
  }
117
115
  else
118
116
  {
@@ -170,7 +168,7 @@ MagickInfo_to_format(const MagickInfo *magick_info)
170
168
  * @return [Hash] the formats hash.
171
169
  */
172
170
  VALUE
173
- Magick_init_formats(VALUE class ATTRIBUTE_UNUSED)
171
+ Magick_init_formats(VALUE klass ATTRIBUTE_UNUSED)
174
172
  {
175
173
  const MagickInfo **magick_info;
176
174
  size_t number_formats, x;
@@ -210,11 +208,11 @@ Magick_init_formats(VALUE class ATTRIBUTE_UNUSED)
210
208
  * Set resource limits.
211
209
  * @param resource [String, Symbol] the type of resource
212
210
  * @param limit [Numeric] the new limit number
213
- *
211
+ *
214
212
  * @return [Numeric] the old limit.
215
213
  */
216
214
  VALUE
217
- Magick_limit_resource(int argc, VALUE *argv, VALUE class)
215
+ Magick_limit_resource(int argc, VALUE *argv, VALUE klass)
218
216
  {
219
217
  VALUE resource, limit;
220
218
  ResourceType res = UndefinedResource;
@@ -227,7 +225,7 @@ Magick_limit_resource(int argc, VALUE *argv, VALUE class)
227
225
  switch (TYPE(resource))
228
226
  {
229
227
  case T_NIL:
230
- return class;
228
+ return klass;
231
229
 
232
230
  case T_SYMBOL:
233
231
  id = (ID)SYM2ID(resource);
@@ -265,7 +263,7 @@ Magick_limit_resource(int argc, VALUE *argv, VALUE class)
265
263
  str = StringValueCStr(resource);
266
264
  if (*str == '\0')
267
265
  {
268
- return class;
266
+ return klass;
269
267
  }
270
268
  else if (rm_strcasecmp("area", str) == 0)
271
269
  {
@@ -321,12 +319,12 @@ Magick_limit_resource(int argc, VALUE *argv, VALUE class)
321
319
  * @param threshold [Numeric] the number of megabytes to set.
322
320
  */
323
321
  VALUE
324
- Magick_set_cache_threshold(VALUE class, VALUE threshold)
322
+ Magick_set_cache_threshold(VALUE klass, VALUE threshold)
325
323
  {
326
324
  unsigned long thrshld = NUM2ULONG(threshold);
327
325
  SetMagickResourceLimit(MemoryResource, (MagickSizeType)thrshld);
328
326
  SetMagickResourceLimit(MapResource, (MagickSizeType)(2*thrshld));
329
- return class;
327
+ return klass;
330
328
  }
331
329
 
332
330
 
@@ -354,7 +352,7 @@ Magick_set_cache_threshold(VALUE class, VALUE threshold)
354
352
  * @param args [String] the mask of log event.
355
353
  */
356
354
  VALUE
357
- Magick_set_log_event_mask(int argc, VALUE *argv, VALUE class)
355
+ Magick_set_log_event_mask(int argc, VALUE *argv, VALUE klass)
358
356
  {
359
357
  int x;
360
358
 
@@ -366,7 +364,7 @@ Magick_set_log_event_mask(int argc, VALUE *argv, VALUE class)
366
364
  {
367
365
  SetLogEventMask(StringValueCStr(argv[x]));
368
366
  }
369
- return class;
367
+ return klass;
370
368
  }
371
369
 
372
370
  /**
@@ -388,9 +386,8 @@ Magick_set_log_event_mask(int argc, VALUE *argv, VALUE class)
388
386
  * @param format [String] the format to set.
389
387
  */
390
388
  VALUE
391
- Magick_set_log_format(VALUE class, VALUE format)
389
+ Magick_set_log_format(VALUE klass, VALUE format)
392
390
  {
393
391
  SetLogFormat(StringValueCStr(format));
394
- return class;
392
+ return klass;
395
393
  }
396
-