diff --git a/contrib/btree_gin/btree_gin--1.0--1.1.sql b/contrib/btree_gin/btree_gin--1.0--1.1.sql
index 8965247..dd81d27 100644
--- a/contrib/btree_gin/btree_gin--1.0--1.1.sql
+++ b/contrib/btree_gin/btree_gin--1.0--1.1.sql
@@ -3,7 +3,7 @@
 -- complain if script is sourced in psql, rather than via CREATE EXTENSION
 \echo Use "ALTER EXTENSION btree_gin UPDATE TO '1.1'" to load this file. \quit
 
--- macaddr8 datatype support new in 1.0.
+-- macaddr8 datatype support new in 10.0.
 CREATE FUNCTION gin_extract_value_macaddr8(macaddr8, internal)
 RETURNS internal
 AS 'MODULE_PATHNAME'
diff --git a/contrib/btree_gin/btree_gin--1.2--1.3.sql b/contrib/btree_gin/btree_gin--1.2--1.3.sql
index f7523a3..fe80983 100644
--- a/contrib/btree_gin/btree_gin--1.2--1.3.sql
+++ b/contrib/btree_gin/btree_gin--1.2--1.3.sql
@@ -117,7 +117,7 @@ RETURNS internal
 AS 'MODULE_PATHNAME'
 LANGUAGE C STRICT IMMUTABLE;
 
-CREATE OPERATOR CLASS anyrange_ops
+CREATE OPERATOR CLASS range_ops
 DEFAULT FOR TYPE anyrange USING gin
 AS
     OPERATOR        1       <,
diff --git a/contrib/btree_gin/btree_gin.c b/contrib/btree_gin/btree_gin.c
index e1206a6..b5b26c9 100644
--- a/contrib/btree_gin/btree_gin.c
+++ b/contrib/btree_gin/btree_gin.c
@@ -510,18 +510,20 @@ leftmostvalue_bool(void)
 GIN_SUPPORT(bool, false, leftmostvalue_bool, btboolcmp)
 
 /*
- * Use a similar trick to that used for numeric for anyrange, since we don't
- * know the concrete type. We could try to build a fake empty range, but that
- * seems weaker and more complex than simple using the NULL ref trick.
- *
- * Note that we use CallerFInfoFunctionCall2 here so that range_cmp
- * gets a valid fn_extra to work with. Unlike most other type comparison
- * routines it needs it, so we can't use DirectFunctionCall2.
+ * Similarly to numeric, we don't know the left-most value, although for
+ * different reasons (numeric does not have one, while for anyarray we
+ * don't even know the concrete type). We could try to build a fake empty
+ * range, but we simply use PointerGetDatum(NULL) just like for Numeric.
  */
 #define ANYRANGE_IS_LEFTMOST(x) ((x) == NULL)
 
 PG_FUNCTION_INFO_V1(gin_anyrange_cmp);
 
+/*
+ * Note that we use CallerFInfoFunctionCall2 here so that range_cmp
+ * gets a valid fn_extra to work with. Unlike most other type comparison
+ * routines it needs it, so we can't use DirectFunctionCall2.
+ */
 Datum
 gin_anyrange_cmp(PG_FUNCTION_ARGS)
 {
diff --git a/doc/src/sgml/btree-gin.sgml b/doc/src/sgml/btree-gin.sgml
index a951f86..e1315da 100644
--- a/doc/src/sgml/btree-gin.sgml
+++ b/doc/src/sgml/btree-gin.sgml
@@ -18,7 +18,7 @@
   <type>varchar</type>, <type>text</type>, <type>bytea</type>, <type>bit</type>,
   <type>varbit</type>, <type>macaddr</type>, <type>macaddr8</type>, <type>inet</type>,
   <type>cidr</type>, <type>uuid</type>, <type>name</type>, <type>bool</type>,
-  <type>bpchar</type>, and all <type>enum</type> and <type>range</type> types.
+  <type>bpchar</type>, and all <type>enum</type> and <type>anyrange</type> types.
  </para>
 
  <para>
