summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/RubyUtil.cpp
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2007-09-04 11:14:53 +0800
committerMatthew Newhook <matthew@zeroc.com>2007-09-04 11:14:53 +0800
commita55b88dc20dacaf23c5fce8415daf28c63388ccf (patch)
tree713968abb7de9959600eb59461bd97384b0c4d74 /cpp/src/Slice/RubyUtil.cpp
parentbug 2442 - slice2java generating bad impl code (diff)
downloadice-a55b88dc20dacaf23c5fce8415daf28c63388ccf.tar.bz2
ice-a55b88dc20dacaf23c5fce8415daf28c63388ccf.tar.xz
ice-a55b88dc20dacaf23c5fce8415daf28c63388ccf.zip
http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=2369
Diffstat (limited to 'cpp/src/Slice/RubyUtil.cpp')
-rw-r--r--cpp/src/Slice/RubyUtil.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/cpp/src/Slice/RubyUtil.cpp b/cpp/src/Slice/RubyUtil.cpp
index bd995ce21aa..07bdebd46d6 100644
--- a/cpp/src/Slice/RubyUtil.cpp
+++ b/cpp/src/Slice/RubyUtil.cpp
@@ -1738,6 +1738,11 @@ Slice::Ruby::fixIdent(const string& ident, IdentStyle style)
case IdentNormal:
break;
case IdentToUpper:
+ // Special case BEGIN & END for class/module names.
+ if(id == "BEGIN" || id == "END")
+ {
+ return id + "_";
+ }
if(id[0] >= 'a' && id[0] <= 'z')
{
id[0] += 'A' - 'a';