swig/Examples/test-suite/ruby/ruby_naming_bugs_runme.rb
Olly Betts 2e98189564 [Ruby] Fix remove of prefix from method name
The prefix is now only removed at the start.

Fixes https://sourceforge.net/p/swig/bugs/1136/
2022-02-02 15:53:23 +13:00

16 lines
422 B
Ruby

#!/usr/bin/env ruby
#
# Regression tests for Ruby naming bugs
#
require 'swig_assert'
require 'ruby_naming_bugs'
# Prior to SWIG 4.1.0 the "Cool_" here was overzealously removed
# while trying to remove a class name prefix, so this method would be
# named "somethingFast" in Ruby instead.
c = Ruby_naming_bugs::Cool.new()
if c.somethingCool_Fast != 42
raise RuntimeError, "Incorrect value for somethingCool_Fast"
end